msi: Create the destination directory if it doesn't exist when duplicating files

James Hawkins truiken at gmail.com
Tue May 29 12:09:44 CDT 2007


Hi,

Fixes bug 8538.  http://bugs.winehq.org/show_bug.cgi?id=8538

Changelog:
* Create the destination directory if it doesn't exist when duplicating files.

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

-- 
James Hawkins
-------------- next part --------------
diff --git a/dlls/msi/files.c b/dlls/msi/files.c
index 9717537..ae675e9 100644
--- a/dlls/msi/files.c
+++ b/dlls/msi/files.c
@@ -899,6 +899,9 @@ static UINT ITERATE_DuplicateFiles(MSIRE
     TRACE("Duplicating file %s to %s\n",debugstr_w(file->TargetPath),
                     debugstr_w(dest)); 
 
+    if (GetFileAttributesW(dest_path) == INVALID_FILE_ATTRIBUTES)
+        CreateDirectoryW(dest_path, NULL);
+
     if (strcmpW(file->TargetPath,dest))
         rc = !CopyFileW(file->TargetPath,dest,TRUE);
     else
-- 
1.4.1


More information about the wine-patches mailing list