KWSys: Fix SplitPath for leading '\' on Windows
Windows paths may begin with a single backslash when the drive letter is omitted. Recognize this as a root path component.
This commit is contained in:
parent
78474d9f24
commit
0a21abd690
|
@ -3143,9 +3143,9 @@ const char* SystemTools::SplitPathRootComponent(const char* p,
|
||||||
}
|
}
|
||||||
c += 2;
|
c += 2;
|
||||||
}
|
}
|
||||||
else if(c[0] == '/')
|
else if(c[0] == '/' || c[0] == '\\')
|
||||||
{
|
{
|
||||||
// Unix path.
|
// Unix path (or Windows path w/out drive letter).
|
||||||
if(root)
|
if(root)
|
||||||
{
|
{
|
||||||
*root = "/";
|
*root = "/";
|
||||||
|
|
Loading…
Reference in New Issue