- Revert r40483
authorDmitry Chapyshev <dmitry@reactos.org>
Wed, 15 Apr 2009 15:47:45 +0000 (15:47 +0000)
committerDmitry Chapyshev <dmitry@reactos.org>
Wed, 15 Apr 2009 15:47:45 +0000 (15:47 +0000)
svn path=/trunk/; revision=40529

reactos/dll/win32/kernel32/process/procsup.c

index d84384a..7b8bafb 100644 (file)
@@ -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.