mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 01:55:19 +00:00
RtlGetFullPathName_U() must use a drive's root directory if a current directory has not been assigned.
This fixes bug #7. svn path=/trunk/; revision=6317
This commit is contained in:
parent
98354eb95c
commit
ca72cbfce5
1 changed files with 8 additions and 3 deletions
|
@ -1,4 +1,4 @@
|
|||
/* $Id: path.c,v 1.20 2003/07/11 13:50:23 royce Exp $
|
||||
/* $Id: path.c,v 1.21 2003/10/14 19:36:26 ekohl Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS system libraries
|
||||
|
@ -380,8 +380,8 @@ RtlSetCurrentDirectory_U(PUNICODE_STRING name)
|
|||
|
||||
RtlAcquirePebLock ();
|
||||
cd = (PCURDIR)&NtCurrentPeb ()->ProcessParameters->CurrentDirectoryName;
|
||||
|
||||
size = cd->DosPath.MaximumLength;
|
||||
|
||||
buf = RtlAllocateHeap (RtlGetProcessHeap(),
|
||||
0,
|
||||
size);
|
||||
|
@ -638,11 +638,16 @@ CHECKPOINT;
|
|||
CHECKPOINT;
|
||||
if (Status == STATUS_BUFFER_TOO_SMALL)
|
||||
return pfx.Length + len * 2 + 2;
|
||||
memcpy (TempFullPathName, var, 6);
|
||||
CHECKPOINT;
|
||||
TempFullPathName[0] = drive;
|
||||
TempFullPathName[1] = L':';
|
||||
TempFullPathName[2] = L'\\';
|
||||
TempFullPathName[3] = 0;
|
||||
templen = 3;
|
||||
}
|
||||
else
|
||||
{
|
||||
CHECKPOINT;
|
||||
templen = pfx.Length / sizeof(WCHAR);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue