Fix Split-Path -NoQualifier for Unix paths

This commit is contained in:
Jason Shirk (POWERSHELL) committed 2016-06-30 12:59:04 -07:00
1 parent bfc5b7e836
commit 4269398379
1 file changed
+6 -3
@@ -553,9 +553,12 @@ namespace Microsoft.PowerShell.Commands
if (SessionState.Path.IsPSAbsolute(path, out driveName))
{
// Remove the drive name and colon
result = path.Substring(driveName.Length + 1);
var driveNameLength = driveName.Length;
if (path.Length > (driveNameLength + 1) && path[driveNameLength] == ':')
{
// Remove the drive name and colon
result = path.Substring(driveNameLength + 1);
}
}
}