mirror of
https://github.com/aphrody-labs/PowerShell.git
synced 2026-10-17 04:36:39 +00:00
Fix Split-Path -NoQualifier for Unix paths
This commit is contained in:
1 parent
bfc5b7e836
commit
4269398379
1 file changed
+6
-3
+6
-3
@@ -553,9 +553,12 @@ namespace Microsoft.PowerShell.Commands
|
|||||||
|
|
||||||
if (SessionState.Path.IsPSAbsolute(path, out driveName))
|
if (SessionState.Path.IsPSAbsolute(path, out driveName))
|
||||||
{
|
{
|
||||||
// Remove the drive name and colon
|
var driveNameLength = driveName.Length;
|
||||||
|
if (path.Length > (driveNameLength + 1) && path[driveNameLength] == ':')
|
||||||
result = path.Substring(driveName.Length + 1);
|
{
|
||||||
|
// Remove the drive name and colon
|
||||||
|
result = path.Substring(driveNameLength + 1);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user