From bc1f3b60c05ba4df2ee4e3d72a167fb028eb15bb Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Mon, 15 Mar 2004 03:07:58 +0000 Subject: [PATCH] explicitly unmount previous mounts (this is not yet well-tested) --- .../src/arch/MemoryCard/MemoryCardDriver_Windows.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/stepmania/src/arch/MemoryCard/MemoryCardDriver_Windows.cpp b/stepmania/src/arch/MemoryCard/MemoryCardDriver_Windows.cpp index 4c49f53fa5..c23ed3c619 100644 --- a/stepmania/src/arch/MemoryCard/MemoryCardDriver_Windows.cpp +++ b/stepmania/src/arch/MemoryCard/MemoryCardDriver_Windows.cpp @@ -83,8 +83,12 @@ bool MemoryCardDriver_Windows::MountAndTestWrite( UsbStorageDevice* pDevice, CSt fclose( fp ); remove( sFile ); - // XXX: Remounting a different OS directory to the same mount point - // seems to be broken. Investigate this later... + /* Unmount any previous mounts for this mountpoint. */ + vector Mounts; + FILEMAN->GetLoadedDrivers( Mounts ); + for( unsigned i = 0; i < Mounts.size(); ++i ) + FILEMAN->Unmount( Mounts[i].Type, Mounts[i].Root, Mounts[i].MountPoint ); + FILEMAN->Mount( "dir", pDevice->sOsMountDir, sMountPoint.c_str() ); LOG->Trace( "FILEMAN->Mount %s %s", pDevice->sOsMountDir.c_str(), sMountPoint.c_str() );