Fixed in v6.1.0-preview.3
Get-ChildItem
returns FileSystemInfo
objects. Objects representing the same
item may be converted to strings differently. In some cases they are converted
as full paths, in other cases as just names.
For example, this command gets items that converted to strings as full paths:
Get-ChildItem . -Include *
This command gets the same items but they are converted to strings as names:
Get-ChildItem .
Scripts
- Test-1-different-ToString.ps1 shows different conversion to strings of seemingly same items.
- Test-2-Resolve-Path-fails.ps1 shows how
Resolve-Path
fails with items returned fromGet-ChildItem
.
- Stack Overflow question
- Microsoft Connect 556004
- Microsoft Connect 1441999