fix short path processing
This commit is contained in:
parent
11f93c5a2b
commit
586084fb6b
1 changed files with 6 additions and 1 deletions
|
@ -129,7 +129,7 @@ namespace Microsoft.PowerShell.Commands
|
|||
|
||||
foreach (string item in path.Split(StringLiterals.DefaultPathSeparator))
|
||||
{
|
||||
if (itemsToSkip-- > 0 || item.Contains('~'))
|
||||
if (itemsToSkip-- > 0)
|
||||
{
|
||||
// This handles the UNC server and share and 8.3 short path syntax
|
||||
exactPath += item + StringLiterals.DefaultPathSeparator;
|
||||
|
@ -145,6 +145,11 @@ namespace Microsoft.PowerShell.Commands
|
|||
// This handles the trailing slash case
|
||||
continue;
|
||||
}
|
||||
else if (item.Contains('~'))
|
||||
{
|
||||
// This handles short path names
|
||||
exactPath += StringLiterals.DefaultPathSeparator + item;
|
||||
}
|
||||
else
|
||||
{
|
||||
exactPath = Directory.GetFileSystemEntries(exactPath, item).First();
|
||||
|
|
Loading…
Reference in a new issue