mirror of
https://github.com/reactos/reactos.git
synced 2024-12-31 19:42:51 +00:00
[RTL]
Revert r59165 because RtlPrefixUnicodeString may not behave exactly as what the original code did (but keep the command in comment). I also want how tests behave with the change. svn path=/trunk/; revision=59173
This commit is contained in:
parent
4c073fdf30
commit
6a14b4a76e
1 changed files with 16 additions and 11 deletions
|
@ -479,18 +479,15 @@ RtlpDosPathNameToRelativeNtPathName_Ustr(IN BOOLEAN HaveRelative,
|
|||
/* Capture input string */
|
||||
CapturedDosName = *DosName;
|
||||
|
||||
/* Check for the presence of the NT prefix "\\?\" form */
|
||||
if (RtlPrefixUnicodeString(&RtlpWin32NtRootSlash, &CapturedDosName, FALSE))
|
||||
/* Check for the presence or absence of the NT prefix "\\?\" form */
|
||||
// if (!RtlPrefixUnicodeString(&RtlpWin32NtRootSlash, &CapturedDosName, FALSE))
|
||||
if ((CapturedDosName.Length <= RtlpWin32NtRootSlash.Length) ||
|
||||
(CapturedDosName.Buffer[0] != RtlpWin32NtRootSlash.Buffer[0]) ||
|
||||
(CapturedDosName.Buffer[1] != RtlpWin32NtRootSlash.Buffer[1]) ||
|
||||
(CapturedDosName.Buffer[2] != RtlpWin32NtRootSlash.Buffer[2]) ||
|
||||
(CapturedDosName.Buffer[3] != RtlpWin32NtRootSlash.Buffer[3]))
|
||||
{
|
||||
/* NT prefix is contained in the path */
|
||||
|
||||
/* Use the optimized path after acquiring the lock */
|
||||
QuickPath = TRUE;
|
||||
NewBuffer = NULL;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* NT prefix is not contained in the path */
|
||||
/* NT prefix not present */
|
||||
|
||||
/* Quick path won't be used */
|
||||
QuickPath = FALSE;
|
||||
|
@ -504,6 +501,14 @@ RtlpDosPathNameToRelativeNtPathName_Ustr(IN BOOLEAN HaveRelative,
|
|||
DPRINT("MaxLength: %lx\n", MaxLength);
|
||||
if (!NewBuffer) return STATUS_NO_MEMORY;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* NT prefix present */
|
||||
|
||||
/* Use the optimized path after acquiring the lock */
|
||||
QuickPath = TRUE;
|
||||
NewBuffer = NULL;
|
||||
}
|
||||
|
||||
/* Lock the PEB and check if the quick path can be used */
|
||||
RtlAcquirePebLock();
|
||||
|
|
Loading…
Reference in a new issue