From 5bc1879d50ab736e82e450dc8555dadf98a32ea6 Mon Sep 17 00:00:00 2001 From: Johannes Anderwald Date: Mon, 12 May 2008 16:59:06 +0000 Subject: [PATCH] - create the profiles directory if it does not yet exist svn path=/trunk/; revision=33477 --- reactos/dll/win32/userenv/profile.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/reactos/dll/win32/userenv/profile.c b/reactos/dll/win32/userenv/profile.c index a29190a4632..921bd1e5320 100644 --- a/reactos/dll/win32/userenv/profile.c +++ b/reactos/dll/win32/userenv/profile.c @@ -216,6 +216,16 @@ CreateUserProfileW (PSID Sid, 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 */ dwLength = MAX_PATH * sizeof(WCHAR); Error = RegQueryValueExW (hKey,