Little forgotten line. We're bound to have loads of that for Xbox...

This commit is contained in:
Renaud Lepage
2005-08-26 19:05:49 +00:00
parent 1507fb20e1
commit b313df449a
@@ -98,12 +98,12 @@ static bool WinMoveFileInternal( const CString &sOldPath, const CString &sNewPat
bool WinMoveFile( CString sOldPath, CString sNewPath )
{
if( WinMoveFileInternal(sOldPath, sNewPath) )
if( WinMoveFileInternal( DoPathReplace(sOldPath), DoPathReplace(sNewPath) )
return true;
if( GetLastError() != ERROR_ACCESS_DENIED )
return false;
/* Try turning off the read-only bit on the file we're overwriting. */
SetFileAttributes( sNewPath, FILE_ATTRIBUTE_NORMAL );
SetFileAttributes( DoPathReplace(sNewPath), FILE_ATTRIBUTE_NORMAL );
return WinMoveFileInternal( DoPathReplace(sOldPath), DoPathReplace(sNewPath) );
}