mirror of
https://github.com/reactos/reactos.git
synced 2024-06-27 16:31:30 +00:00
[CMD] Correctly parse drive-decorated pathname (#2382)
Correctly interpret the drive-decorated pathnames (C: or D:dir1 etc). CORE-15871
This commit is contained in:
parent
554c41e4d7
commit
a9760098f7
|
@ -1770,7 +1770,14 @@ ResolvePattern(
|
||||||
* they are part of the actual directory path; the exception being if
|
* they are part of the actual directory path; the exception being if
|
||||||
* these are the special "." or ".." directories.
|
* these are the special "." or ".." directories.
|
||||||
*/
|
*/
|
||||||
if (pszPatternPart == NULL)
|
if (_istalpha(pNextDir[0]) && pNextDir[1] == _T(':') && pNextDir[2] != _T('\\'))
|
||||||
|
{
|
||||||
|
/*
|
||||||
|
* The syntax "<drive_letter>:" without any trailing backslash actually
|
||||||
|
* means: "current directory on this drive".
|
||||||
|
*/
|
||||||
|
}
|
||||||
|
else if (pszPatternPart == NULL)
|
||||||
{
|
{
|
||||||
ASSERT(pszFullPath[_tcslen(pszFullPath)-1] == _T('\\'));
|
ASSERT(pszFullPath[_tcslen(pszFullPath)-1] == _T('\\'));
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue