msi: Reset file attributes before removing a file.
Hans Leidekker
hans at codeweavers.com
Tue Feb 1 05:27:09 CST 2011
Fixes http://bugs.winehq.org/show_bug.cgi?id=25943
---
dlls/msi/files.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/dlls/msi/files.c b/dlls/msi/files.c
index 1205690..a044ec7 100644
--- a/dlls/msi/files.c
+++ b/dlls/msi/files.c
@@ -1048,9 +1048,11 @@ UINT ACTION_RemoveFiles( MSIPACKAGE *package )
}
TRACE("removing %s\n", debugstr_w(file->File) );
+
+ SetFileAttributesW( file->TargetPath, FILE_ATTRIBUTE_NORMAL );
if (!DeleteFileW( file->TargetPath ))
{
- WARN("failed to delete %s\n", debugstr_w(file->TargetPath));
+ WARN("failed to delete %s (%u)\n", debugstr_w(file->TargetPath), GetLastError());
}
/* FIXME: check persistence for each directory */
else if (r && (dir = strdupW( file->TargetPath )))
--
1.7.1
More information about the wine-patches
mailing list