Alexandre Julliard : wineboot: Don' t print an error when failing to delete a file.
Alexandre Julliard
julliard at winehq.org
Tue Jun 11 14:27:53 CDT 2013
Module: wine
Branch: master
Commit: 849ea3d6515dd2a64991a0d8dc580b7a074427f9
URL: http://source.winehq.org/git/wine.git/?a=commit;h=849ea3d6515dd2a64991a0d8dc580b7a074427f9
Author: Alexandre Julliard <julliard at winehq.org>
Date: Tue Jun 11 13:50:05 2013 +0200
wineboot: Don't print an error when failing to delete a file.
---
programs/wineboot/wineboot.c | 16 +---------------
1 files changed, 1 insertions(+), 15 deletions(-)
diff --git a/programs/wineboot/wineboot.c b/programs/wineboot/wineboot.c
index 7b68747..b8512e3 100644
--- a/programs/wineboot/wineboot.c
+++ b/programs/wineboot/wineboot.c
@@ -545,21 +545,7 @@ static BOOL pendingRename(void)
} else
{
/* Delete the file or directory */
- if( (res=GetFileAttributesW(src))!=INVALID_FILE_ATTRIBUTES )
- {
- if( (res&FILE_ATTRIBUTE_DIRECTORY)==0 )
- {
- /* It's a file */
- DeleteFileW(src);
- } else
- {
- /* It's a directory */
- RemoveDirectoryW(src);
- }
- } else
- {
- WINE_ERR("couldn't get file attributes (%d)\n", GetLastError() );
- }
+ if (!RemoveDirectoryW( src ) && GetLastError() == ERROR_DIRECTORY) DeleteFileW( src );
}
}
More information about the wine-cvs
mailing list