mirror of
https://github.com/reactos/reactos.git
synced 2025-08-04 23:35:45 +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
|
* COPYRIGHT: See COPYING in the top level directory
|
||||||
* PROJECT: ReactOS system libraries
|
* PROJECT: ReactOS system libraries
|
||||||
|
@ -380,8 +380,8 @@ RtlSetCurrentDirectory_U(PUNICODE_STRING name)
|
||||||
|
|
||||||
RtlAcquirePebLock ();
|
RtlAcquirePebLock ();
|
||||||
cd = (PCURDIR)&NtCurrentPeb ()->ProcessParameters->CurrentDirectoryName;
|
cd = (PCURDIR)&NtCurrentPeb ()->ProcessParameters->CurrentDirectoryName;
|
||||||
|
|
||||||
size = cd->DosPath.MaximumLength;
|
size = cd->DosPath.MaximumLength;
|
||||||
|
|
||||||
buf = RtlAllocateHeap (RtlGetProcessHeap(),
|
buf = RtlAllocateHeap (RtlGetProcessHeap(),
|
||||||
0,
|
0,
|
||||||
size);
|
size);
|
||||||
|
@ -638,11 +638,16 @@ CHECKPOINT;
|
||||||
CHECKPOINT;
|
CHECKPOINT;
|
||||||
if (Status == STATUS_BUFFER_TOO_SMALL)
|
if (Status == STATUS_BUFFER_TOO_SMALL)
|
||||||
return pfx.Length + len * 2 + 2;
|
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;
|
templen = 3;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
CHECKPOINT;
|
||||||
templen = pfx.Length / sizeof(WCHAR);
|
templen = pfx.Length / sizeof(WCHAR);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue