diff --git a/stepmania/src/RageFileDriver.h b/stepmania/src/RageFileDriver.h index 8105970f7f..548c57960d 100644 --- a/stepmania/src/RageFileDriver.h +++ b/stepmania/src/RageFileDriver.h @@ -19,7 +19,6 @@ public: virtual int GetFileSizeInBytes( const CString &sFilePath ); virtual int GetFileHash( const CString &sPath ); virtual int GetPathValue( const CString &path ); - virtual bool Ready() { return true; } /* see RageFileManager::MountpointIsReady */ virtual void FlushDirCache( const CString &sPath ); virtual bool Remove( const CString &sPath ) { return false; } diff --git a/stepmania/src/RageFileDriverDirect.cpp b/stepmania/src/RageFileDriverDirect.cpp index 27056f32e9..e925739322 100644 --- a/stepmania/src/RageFileDriverDirect.cpp +++ b/stepmania/src/RageFileDriverDirect.cpp @@ -167,11 +167,6 @@ RageFileBasic *RageFileObjDirect::Copy() const return ret; } -bool RageFileDriverDirect::Ready() -{ - return PathReady( root ); -} - bool RageFileDriverDirect::Remount( const CString &sPath ) { root = sPath; diff --git a/stepmania/src/RageFileDriverDirect.h b/stepmania/src/RageFileDriverDirect.h index a8c772c78e..a168608868 100644 --- a/stepmania/src/RageFileDriverDirect.h +++ b/stepmania/src/RageFileDriverDirect.h @@ -12,7 +12,6 @@ public: RageFileBasic *Open( const CString &path, int mode, int &err ); bool Remove( const CString &sPath ); - bool Ready(); bool Remount( const CString &sPath ); private: diff --git a/stepmania/src/RageFileDriverDirectHelpers.cpp b/stepmania/src/RageFileDriverDirectHelpers.cpp index 1835195f94..a9cdfda0e9 100644 --- a/stepmania/src/RageFileDriverDirectHelpers.cpp +++ b/stepmania/src/RageFileDriverDirectHelpers.cpp @@ -116,52 +116,6 @@ bool WinMoveFile( CString sOldPath, CString sNewPath ) } #endif -bool PathReady( CString path ) -{ -#ifdef _WINDOWS - // Windows will throw up a message box if we try to write to a - // removable drive with no disk inserted. Find out whether there's a - // disk in the drive w/o writing a file. - - // find drive letter - vector matches; - static Regex parse("^([A-Za-z]+):"); - parse.Compare( path, matches ); - if( matches.size() != 1 ) - return false; - - CString sDrive = matches[0]; - TCHAR szVolumeNameBuffer[MAX_PATH]; - DWORD dwVolumeSerialNumber; - DWORD dwMaximumComponentLength; - DWORD lpFileSystemFlags; - TCHAR szFileSystemNameBuffer[MAX_PATH]; - BOOL bResult = GetVolumeInformation( - sDrive + ":\\", - szVolumeNameBuffer, - sizeof(szVolumeNameBuffer), - &dwVolumeSerialNumber, - &dwMaximumComponentLength, - &lpFileSystemFlags, - szFileSystemNameBuffer, - sizeof(szFileSystemNameBuffer) ); - return !!bResult; -#else - // Try to create directory before writing a temp file. - CreateDirectories( path ); - - // Try to write a file. - const CString sFile = path + "temp"; - int fd = DoOpen( sFile, O_WRONLY|O_CREAT|O_TRUNC, 0644 ); - if( fd == -1 ) - return false; - - close( fd ); - remove( sFile ); - return true; -#endif -} - /* mkdir -p. Doesn't fail if Path already exists and is a directory. */ bool CreateDirectories( CString Path ) { diff --git a/stepmania/src/RageFileDriverDirectHelpers.h b/stepmania/src/RageFileDriverDirectHelpers.h index 77abbf1246..f03a147404 100644 --- a/stepmania/src/RageFileDriverDirectHelpers.h +++ b/stepmania/src/RageFileDriverDirectHelpers.h @@ -30,7 +30,6 @@ bool WinMoveFile( CString sOldPath, CString sNewPath ); #endif bool CreateDirectories( CString sPath ); -bool PathReady( CString sPath ); #include "RageUtil_FileDB.h" class DirectFilenameDB: public FilenameDB