msi: Don't fail if we can't remove an existing install file

James Hawkins truiken at gmail.com
Mon Nov 27 20:18:51 CST 2006


Hi,

Changelog:
* Don't fail if we can't remove an existing install file.

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

-- 
James Hawkins
-------------- next part --------------
diff --git a/dlls/msi/files.c b/dlls/msi/files.c
index 00f2a01..cf7baf4 100644
--- a/dlls/msi/files.c
+++ b/dlls/msi/files.c
@@ -355,8 +355,12 @@ static INT_PTR cabinet_notify(FDINOTIFIC
                               NULL, CREATE_ALWAYS, attrs, NULL );
         if ( handle == INVALID_HANDLE_VALUE )
         {
-            ERR("failed to create %s (error %d)\n",
-                debugstr_w( f->TargetPath ), GetLastError() );
+            if ( GetFileAttributesW( f->TargetPath ) != INVALID_FILE_ATTRIBUTES )
+                f->state = msifs_installed;
+            else
+                ERR("failed to create %s (error %d)\n",
+                    debugstr_w( f->TargetPath ), GetLastError() );
+
             return 0;
         }
 
-- 
1.4.1


More information about the wine-patches mailing list