You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Shortened paths (like c:\program~1 for c:\program files) don't get expanded by Resolve-Path. This normally wouldn't be a problem except for instances of logic where we retrieve a list of files under that path, and then attempt to parse out that root path (example: in PackageTool, when we do this:
In a scenario like that, the full name of the file will be expanded and not the shortened version, thus the initial part won't be correctly lobbed off.
We need to do something like this:
$inputPath= (Get-Item-Path $inputPath).FullName
for any $inputPath that we get from the user where a scenario like this might be possible. That will ensure that the path is expanded before we operate on it.
The text was updated successfully, but these errors were encountered:
Shortened paths (like
c:\program~1
forc:\program files
) don't get expanded byResolve-Path
. This normally wouldn't be a problem except for instances of logic where we retrieve a list of files under that path, and then attempt to parse out that root path (example: in PackageTool, when we do this:In a scenario like that, the full name of the file will be expanded and not the shortened version, thus the initial part won't be correctly lobbed off.
We need to do something like this:
for any
$inputPath
that we get from the user where a scenario like this might be possible. That will ensure that the path is expanded before we operate on it.The text was updated successfully, but these errors were encountered: