update for HEAD-2003050101
[reactos.git] / lib / ntdll / rtl / path.c
index dcdb1c2..2b79c3a 100644 (file)
@@ -104,6 +104,11 @@ static VOID RtlpEatPath (PWSTR Path)
               }
          }
      }
+     if (Path[2] == 0)
+     {
+        Path[2] = L'\\';
+       Path[3] = 0;
+     }
 }
 
 
@@ -252,9 +257,9 @@ RtlGetCurrentDirectory_U(ULONG MaximumLength,
 
        DPRINT ("RtlGetCurrentDirectory %lu %p\n", MaximumLength, Buffer);
 
-       cd = (PCURDIR)&(NtCurrentPeb ()->ProcessParameters->CurrentDirectoryName);\r
-
        RtlAcquirePebLock();
+
+       cd = (PCURDIR)&(NtCurrentPeb ()->ProcessParameters->CurrentDirectoryName);
        Length = cd->DosPath.Length / sizeof(WCHAR);
        if (cd->DosPath.Buffer[Length - 1] == L'\\' &&
            cd->DosPath.Buffer[Length - 2] != L':')
@@ -304,7 +309,7 @@ RtlSetCurrentDirectory_U(PUNICODE_STRING name)
    DPRINT ("RtlSetCurrentDirectory %wZ\n", name);
    
    RtlAcquirePebLock ();
-   cd = (PCURDIR)&NtCurrentPeb ()->ProcessParameters->CurrentDirectoryName;\r
+   cd = (PCURDIR)&NtCurrentPeb ()->ProcessParameters->CurrentDirectoryName;
    size = cd->DosPath.MaximumLength;
    
    buf = RtlAllocateHeap (RtlGetProcessHeap(),
@@ -516,7 +521,7 @@ CHECKPOINT;
 
        RtlAcquirePebLock();
 
-       cd = (PCURDIR)&(NtCurrentPeb ()->ProcessParameters->CurrentDirectoryName);\r
+       cd = (PCURDIR)&(NtCurrentPeb ()->ProcessParameters->CurrentDirectoryName);
 DPRINT("type %ld\n", type);
        switch (type)
        {
@@ -707,7 +712,7 @@ RtlDosPathNameToNtPathName_U(PWSTR dosname,
        if (nah)
        {
                memset (nah, 0, sizeof(CURDIR));
-               cd = (PCURDIR)&(NtCurrentPeb ()->ProcessParameters->CurrentDirectoryName);\r
+               cd = (PCURDIR)&(NtCurrentPeb ()->ProcessParameters->CurrentDirectoryName);
                if (Type == 5 && cd->Handle &&
                    !_wcsnicmp (cd->DosPath.Buffer, fullname, cd->DosPath.Length / 2))
                {