diff --git a/stepmania/src/Profile.cpp b/stepmania/src/Profile.cpp index 0c28548a9a..1e9160c173 100644 --- a/stepmania/src/Profile.cpp +++ b/stepmania/src/Profile.cpp @@ -1926,10 +1926,10 @@ XNode* Profile::SaveCoinDataCreateNode() const void Profile::MoveBackupToDir( CString sFromDir, CString sToDir ) { - FILEMAN->MoveFile( sFromDir+EDITABLE_INI, sToDir+EDITABLE_INI ); - FILEMAN->MoveFile( sFromDir+STATS_XML, sToDir+STATS_XML ); - FILEMAN->MoveFile( sFromDir+STATS_XML+SIGNATURE_APPEND, sToDir+STATS_XML+SIGNATURE_APPEND ); - FILEMAN->MoveFile( sFromDir+DONT_SHARE_SIG, sToDir+DONT_SHARE_SIG ); + FILEMAN->Move( sFromDir+EDITABLE_INI, sToDir+EDITABLE_INI ); + FILEMAN->Move( sFromDir+STATS_XML, sToDir+STATS_XML ); + FILEMAN->Move( sFromDir+STATS_XML+SIGNATURE_APPEND, sToDir+STATS_XML+SIGNATURE_APPEND ); + FILEMAN->Move( sFromDir+DONT_SHARE_SIG, sToDir+DONT_SHARE_SIG ); } // lua start diff --git a/stepmania/src/RageFileDriver.h b/stepmania/src/RageFileDriver.h index d12bee289d..3b465b7a21 100644 --- a/stepmania/src/RageFileDriver.h +++ b/stepmania/src/RageFileDriver.h @@ -19,7 +19,7 @@ public: virtual int GetFileHash( const CString &sPath ); virtual int GetPathValue( const CString &path ); virtual void FlushDirCache( const CString &sPath ); - virtual bool MoveFile( const CString &sOldPath, const CString &sNewPath ) { return false; } + virtual bool Move( const CString &sOldPath, const CString &sNewPath ) { return false; } virtual bool Remove( const CString &sPath ) { return false; } /* Optional: Move to a different place, as if reconstructed with a different path. */ diff --git a/stepmania/src/RageFileDriverDirect.cpp b/stepmania/src/RageFileDriverDirect.cpp index 6447d46bdf..b362375b9b 100644 --- a/stepmania/src/RageFileDriverDirect.cpp +++ b/stepmania/src/RageFileDriverDirect.cpp @@ -122,7 +122,7 @@ RageFileBasic *RageFileDriverDirect::Open( const CString &path, int mode, int &e return MakeFileObjDirect( root + sPath, mode, err ); } -bool RageFileDriverDirect::MoveFile( const CString &sOldPath_, const CString &sNewPath_ ) +bool RageFileDriverDirect::Move( const CString &sOldPath_, const CString &sNewPath_ ) { CString sOldPath = sOldPath_; CString sNewPath = sNewPath_; diff --git a/stepmania/src/RageFileDriverDirect.h b/stepmania/src/RageFileDriverDirect.h index 108a455387..2e95e17fbd 100644 --- a/stepmania/src/RageFileDriverDirect.h +++ b/stepmania/src/RageFileDriverDirect.h @@ -11,7 +11,7 @@ public: RageFileDriverDirect( CString root ); RageFileBasic *Open( const CString &path, int mode, int &err ); - bool MoveFile( const CString &sOldPath, const CString &sNewPath ); + bool Move( const CString &sOldPath, const CString &sNewPath ); bool Remove( const CString &sPath ); bool Remount( const CString &sPath ); diff --git a/stepmania/src/RageFileDriverTimeout.cpp b/stepmania/src/RageFileDriverTimeout.cpp index 187f7713e5..a60f0146ac 100644 --- a/stepmania/src/RageFileDriverTimeout.cpp +++ b/stepmania/src/RageFileDriverTimeout.cpp @@ -61,7 +61,7 @@ enum ThreadRequest REQ_COPY, REQ_POPULATE_FILE_SET, REQ_FLUSH_DIR_CACHE, - REQ_MOVE_FILE, + REQ_MOVE, REQ_REMOVE, }; @@ -85,7 +85,7 @@ public: RageFileBasic *Copy( RageFileBasic *&pFile, CString &sError ); bool FlushDirCache( const CString &sPath ); - int MoveFile( const CString &sOldPath, const CString &sNewPath ); + int Move( const CString &sOldPath, const CString &sNewPath ); int Remove( const CString &sPath ); bool PopulateFileSet( FileSet &fs, const CString &sPath ); @@ -102,10 +102,10 @@ private: vector m_apDeletedFiles; RageMutex m_DeletedFilesLock; - /* REQ_OPEN, REQ_POPULATE_FILE_SET, REQ_FLUSH_DIR_CACHE, REQ_REMOVE, REQ_MOVE_FILE: */ + /* REQ_OPEN, REQ_POPULATE_FILE_SET, REQ_FLUSH_DIR_CACHE, REQ_REMOVE, REQ_MOVE: */ CString m_sRequestPath; /* in */ - /* REQ_MOVE_FILE: */ + /* REQ_MOVE: */ CString m_sRequestPath2; /* in */ /* REQ_OPEN, REQ_COPY: */ @@ -272,10 +272,10 @@ void ThreadedFileWorker::HandleRequest( int iRequest ) m_iResultRequest = m_pChildDriver->Remove( m_sRequestPath )? 0:-1; break; - case REQ_MOVE_FILE: + case REQ_MOVE: ASSERT( !m_sRequestPath.empty() ); ASSERT( !m_sRequestPath2.empty() ); - m_iResultRequest = m_pChildDriver->MoveFile( m_sRequestPath, m_sRequestPath2 )? 0:-1; + m_iResultRequest = m_pChildDriver->Move( m_sRequestPath, m_sRequestPath2 )? 0:-1; break; default: @@ -587,7 +587,7 @@ bool ThreadedFileWorker::PopulateFileSet( FileSet &fs, const CString &sPath ) return true; } -int ThreadedFileWorker::MoveFile( const CString &sOldPath, const CString &sNewPath ) +int ThreadedFileWorker::Move( const CString &sOldPath, const CString &sNewPath ) { ASSERT( m_pChildDriver != NULL ); /* how did you get a file to begin with? */ @@ -598,7 +598,7 @@ int ThreadedFileWorker::MoveFile( const CString &sOldPath, const CString &sNewPa m_sRequestPath = sOldPath; m_sRequestPath2 = sNewPath; - if( !DoRequest(REQ_MOVE_FILE) ) + if( !DoRequest(REQ_MOVE) ) { /* If we time out, we can no longer access pFile. */ return -1; @@ -846,12 +846,12 @@ void RageFileDriverTimeout::FlushDirCache( const CString &sPath ) m_pWorker->FlushDirCache( sPath ); } -bool RageFileDriverTimeout::MoveFile( const CString &sOldPath, const CString &sNewPath ) +bool RageFileDriverTimeout::Move( const CString &sOldPath, const CString &sNewPath ) { - int iRet = m_pWorker->MoveFile( sOldPath, sNewPath ); + int iRet = m_pWorker->Move( sOldPath, sNewPath ); if( iRet == -1 ) { - LOG->Warn( "RageFileDriverTimeout::MoveFile(%s,%s) failed", sOldPath.c_str(), sNewPath.c_str() ); + LOG->Warn( "RageFileDriverTimeout::Move(%s,%s) failed", sOldPath.c_str(), sNewPath.c_str() ); return false; } diff --git a/stepmania/src/RageFileDriverTimeout.h b/stepmania/src/RageFileDriverTimeout.h index 01d985366b..8e4dcc1341 100644 --- a/stepmania/src/RageFileDriverTimeout.h +++ b/stepmania/src/RageFileDriverTimeout.h @@ -15,7 +15,7 @@ public: RageFileBasic *Open( const CString &path, int mode, int &err ); void FlushDirCache( const CString &sPath ); - bool MoveFile( const CString &sOldPath, const CString &sNewPath ); + bool Move( const CString &sOldPath, const CString &sNewPath ); bool Remove( const CString &sPath ); static void SetTimeout( float fSeconds ); diff --git a/stepmania/src/RageFileManager.cpp b/stepmania/src/RageFileManager.cpp index 22c539d3af..e4032a0193 100644 --- a/stepmania/src/RageFileManager.cpp +++ b/stepmania/src/RageFileManager.cpp @@ -402,7 +402,7 @@ void RageFileManager::GetDirListing( CString sPath, CStringArray &AddTo, bool bO } /* Files may only be moved within the same file driver. */ -bool RageFileManager::MoveFile( CString sOldPath, CString sNewPath ) +bool RageFileManager::Move( CString sOldPath, CString sNewPath ) { vector aDriverList; ReferenceAllDrivers( aDriverList ); @@ -419,7 +419,7 @@ bool RageFileManager::MoveFile( CString sOldPath, CString sNewPath ) if( sOldDriverPath.size() == 0 || sNewDriverPath.size() == 0 ) continue; - bool ret = aDriverList[i]->m_pDriver->MoveFile( sOldDriverPath, sNewDriverPath ); + bool ret = aDriverList[i]->m_pDriver->Move( sOldDriverPath, sNewDriverPath ); if( ret ) Deleted = true; } diff --git a/stepmania/src/RageFileManager.h b/stepmania/src/RageFileManager.h index 7086da2b1a..4625a2d448 100644 --- a/stepmania/src/RageFileManager.h +++ b/stepmania/src/RageFileManager.h @@ -16,7 +16,7 @@ public: void MountInitialFilesystems(); void GetDirListing( CString sPath, CStringArray &AddTo, bool bOnlyDirs, bool bReturnPathToo ); - bool MoveFile( CString sOldPath, CString sNewPath ); + bool Move( CString sOldPath, CString sNewPath ); bool Remove( CString sPath ); void CreateDir( CString sDir );