[Wine-patches] [eterhack] msi: Remove read-only files (eterbug #953).

Alexander Morozov amorozov на etersoft.ru
Ср Авг 5 18:33:14 MSD 2009


----------- следующая часть -----------
From 437e3209f0e72196fa486d3f511eeae2243c9ddb Mon Sep 17 00:00:00 2001
From: Alexander Morozov <amorozov на etersoft.ru>
Date: Wed, 5 Aug 2009 18:12:44 +0400
Subject: [eterhack] msi: Remove read-only files (eterbug #953).

---
 dlls/msi/files.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/dlls/msi/files.c b/dlls/msi/files.c
index 6bf764a..87fbb8b 100644
--- a/dlls/msi/files.c
+++ b/dlls/msi/files.c
@@ -574,6 +574,8 @@ UINT ACTION_RemoveFiles( MSIPACKAGE *package )
             continue;
 
         TRACE("removing %s\n", debugstr_w(file->File) );
+        if ( GetFileAttributesW( file->TargetPath ) & FILE_ATTRIBUTE_READONLY )
+            SetFileAttributesW( file->TargetPath, FILE_ATTRIBUTE_NORMAL );
         if ( !DeleteFileW( file->TargetPath ) )
             TRACE("failed to delete %s\n",  debugstr_w(file->TargetPath));
         file->state = msifs_missing;
-- 
1.6.3.3



Подробная информация о списке рассылки Wine-patches