work around VC brain damage
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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. */
|
||||
|
||||
@@ -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_;
|
||||
|
||||
@@ -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 );
|
||||
|
||||
|
||||
@@ -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<RageFileBasic *> 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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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 );
|
||||
|
||||
@@ -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<LoadedDriver *> 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;
|
||||
}
|
||||
|
||||
@@ -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 );
|
||||
|
||||
|
||||
Reference in New Issue
Block a user