[ros-diffs] [janderwald] 33477: - create the profiles directory if it does not yet exist

janderwald at svn.reactos.org janderwald at svn.reactos.org
Mon May 12 18:59:06 CEST 2008


Author: janderwald
Date: Mon May 12 11:59:06 2008
New Revision: 33477

URL: http://svn.reactos.org/svn/reactos?rev=33477&view=rev
Log:
- create the profiles directory if it does not yet exist

Modified:
    trunk/reactos/dll/win32/userenv/profile.c

Modified: trunk/reactos/dll/win32/userenv/profile.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/userenv/profile.c?rev=33477&r1=33476&r2=33477&view=diff
==============================================================================
--- trunk/reactos/dll/win32/userenv/profile.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/userenv/profile.c [iso-8859-1] Mon May 12 11:59:06 2008
@@ -214,6 +214,16 @@
       DPRINT1("Error: %lu\n", GetLastError());
       RegCloseKey (hKey);
       return FALSE;
+    }
+
+  /* create the profiles directory if it does not yet exist */
+  if (!CreateDirectoryW(szProfilesPath, NULL))
+    {
+      if (GetLastError () != ERROR_ALREADY_EXISTS)
+      {
+        DPRINT1("Error: %lu\n", GetLastError());
+        return FALSE;
+      }
     }
 
   /* Get default user path */



More information about the Ros-diffs mailing list