9x overwrite fix

This commit is contained in:
Glenn Maynard
2003-12-21 07:57:03 +00:00
parent f1c667c2b2
commit 1dedd7d54f
+9
View File
@@ -82,6 +82,15 @@ static int WinMoveFile( const CString sOldPath, const CString sNewPath )
Win9x = true;
}
if( MoveFile( sOldPath, sNewPath ) )
return 1;
if( GetLastError() != ERROR_ALREADY_EXISTS )
return 0;
if( !DeleteFile( sNewPath ) )
return 0;
return MoveFile( sOldPath, sNewPath );
}
#endif