From 9f8ebd6a634ed7ca3951b7329c2d1752ee411afe Mon Sep 17 00:00:00 2001 From: Dmitry Chapyshev Date: Wed, 15 Apr 2009 15:47:45 +0000 Subject: [PATCH] - Revert r40483 svn path=/trunk/; revision=40529 --- reactos/dll/win32/kernel32/process/procsup.c | 32 -------------------- 1 file changed, 32 deletions(-) diff --git a/reactos/dll/win32/kernel32/process/procsup.c b/reactos/dll/win32/kernel32/process/procsup.c index d84384ab9ba..7b8bafbb84b 100644 --- a/reactos/dll/win32/kernel32/process/procsup.c +++ b/reactos/dll/win32/kernel32/process/procsup.c @@ -718,38 +718,6 @@ CreateProcessInternalW(HANDLE hToken, return FALSE; } - if (lpCurrentDirectory) - { - LPWSTR FilePart, Buffer = NULL; - - Buffer = RtlAllocateHeap(RtlGetProcessHeap(), - 0, - (MAX_PATH + 1) * sizeof(WCHAR)); - - if (!Buffer) - { - SetLastErrorByStatus(STATUS_NO_MEMORY); - return FALSE; - } - - if (GetFullPathNameW(lpCurrentDirectory, MAX_PATH, Buffer, &FilePart) > MAX_PATH) - { - RtlFreeHeap(RtlGetProcessHeap(), 0, Buffer); - SetLastError(ERROR_DIRECTORY); - return FALSE; - } - - if ((GetFileAttributesW(Buffer) == INVALID_FILE_ATTRIBUTES) || - !(GetFileAttributesW(Buffer) & FILE_ATTRIBUTE_DIRECTORY)) - { - RtlFreeHeap(RtlGetProcessHeap(), 0, Buffer); - SetLastError(ERROR_DIRECTORY); - return FALSE; - } - - RtlFreeHeap(RtlGetProcessHeap(), 0, Buffer); - } - /* * We're going to modify and mask out flags and stuff in lpStartupInfo, * so we'll use our own local copy for that.