From adf2e68f2a21b8469ef3218102860204b3f28c9a Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Sat, 3 Jan 2004 06:34:33 +0000 Subject: [PATCH] maybe fix file writing in win9x --- stepmania/src/RageFileDriverDirect.cpp | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/stepmania/src/RageFileDriverDirect.cpp b/stepmania/src/RageFileDriverDirect.cpp index 029de79352..fb2f0e644c 100644 --- a/stepmania/src/RageFileDriverDirect.cpp +++ b/stepmania/src/RageFileDriverDirect.cpp @@ -67,6 +67,17 @@ static HANDLE DoFindFirstFile( const CString &sPath, WIN32_FIND_DATA *fd ) #endif } +static bool WinCallNotSupported( int err ) +{ + switch( err ) + { + case ERROR_NOT_SUPPORTED: + case ERROR_CALL_NOT_IMPLEMENTED: + return true; + } + return false; +} + static int WinMoveFile( const CString sOldPath, const CString sNewPath ) { static bool Win9x = false; @@ -76,7 +87,7 @@ static int WinMoveFile( const CString sOldPath, const CString sNewPath ) if( MoveFileEx( sOldPath, sNewPath, MOVEFILE_REPLACE_EXISTING ) ) return 1; - if( GetLastError() != ERROR_NOT_SUPPORTED ) + if( !WinCallNotSupported(GetLastError()) ) return 0; Win9x = true;