mirror of
git://source.winehq.org/git/wine.git
synced 2024-07-23 23:06:24 +00:00
Fixed error checking in registry saving.
This commit is contained in:
parent
4ff3b20508
commit
f53aba8acd
|
@ -195,7 +195,7 @@ static void save_key( HKEY hkey, const char *filename )
|
|||
handle = FILE_CreateFile( name, GENERIC_WRITE, 0, NULL,
|
||||
CREATE_NEW, FILE_ATTRIBUTE_NORMAL, -1 );
|
||||
if (handle != INVALID_HANDLE_VALUE) break;
|
||||
if ((ret = GetLastError()) != ERROR_FILE_EXISTS) break;
|
||||
if ((ret = GetLastError()) != ERROR_ALREADY_EXISTS) break;
|
||||
}
|
||||
|
||||
if (handle != INVALID_HANDLE_VALUE)
|
||||
|
@ -212,6 +212,8 @@ static void save_key( HKEY hkey, const char *filename )
|
|||
unlink( name );
|
||||
}
|
||||
}
|
||||
else ERR( "Failed to save registry to %s, err %ld\n", name, GetLastError() );
|
||||
|
||||
HeapFree( GetProcessHeap(), 0, name );
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue