Alexandre Julliard : kernel32: Create the windows and system directories if necessary.

Alexandre Julliard julliard at winehq.org
Thu Apr 17 14:43:44 CDT 2008


Module: wine
Branch: master
Commit: 05e55edd82eb818c3945ccd4e27c28690ddc4f7c
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=05e55edd82eb818c3945ccd4e27c28690ddc4f7c

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Thu Apr 17 20:33:47 2008 +0200

kernel32: Create the windows and system directories if necessary.

---

 dlls/kernel32/process.c |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/dlls/kernel32/process.c b/dlls/kernel32/process.c
index 8d040bd..fe523d6 100644
--- a/dlls/kernel32/process.c
+++ b/dlls/kernel32/process.c
@@ -715,12 +715,12 @@ static void init_windows_dirs(void)
         DIR_System = buffer;
     }
 
-    if (GetFileAttributesW( DIR_Windows ) == INVALID_FILE_ATTRIBUTES)
-        MESSAGE( "Warning: the specified Windows directory %s is not accessible.\n",
-                 debugstr_w(DIR_Windows) );
-    if (GetFileAttributesW( DIR_System ) == INVALID_FILE_ATTRIBUTES)
-        MESSAGE( "Warning: the specified System directory %s is not accessible.\n",
-                 debugstr_w(DIR_System) );
+    if (!CreateDirectoryW( DIR_Windows, NULL ) && GetLastError() != ERROR_ALREADY_EXISTS)
+        ERR( "directory %s could not be created, error %u\n",
+             debugstr_w(DIR_Windows), GetLastError() );
+    if (!CreateDirectoryW( DIR_System, NULL ) && GetLastError() != ERROR_ALREADY_EXISTS)
+        ERR( "directory %s could not be created, error %u\n",
+             debugstr_w(DIR_System), GetLastError() );
 
     TRACE_(file)( "WindowsDir = %s\n", debugstr_w(DIR_Windows) );
     TRACE_(file)( "SystemDir  = %s\n", debugstr_w(DIR_System) );




More information about the wine-cvs mailing list