msi: Reset file attributes before removing a file.

This commit is contained in:
Hans Leidekker 2011-02-01 12:27:09 +01:00 committed by Alexandre Julliard
parent 726c045549
commit bc13c7eb90
1 changed files with 3 additions and 1 deletions

View File

@ -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 )))