PowerShell-Beautifier icon indicating copy to clipboard operation
PowerShell-Beautifier copied to clipboard

Update DestinationPath logic to handle short / relative paths

Open DTW-DanWard opened this issue 8 years ago • 2 comments

If a user does not specify a full path for DestinationPath and that file doesn't already exist (i.e. the Resolve-Path call doesn't work 100% correctly) then assume the user wants the DestinationPath relative to the SourcePath.

Probably something like Join-Path SourcePath DestinationPath but need to handle situation if user has adding ..-type path as prefix.

DTW-DanWard avatar Jun 13 '17 23:06 DTW-DanWard

Actually, should not assume SourcePath. Use same standard as PowerShell - relative to the calling path.

DTW-DanWard avatar Aug 24 '17 19:08 DTW-DanWard

Should probably update path processing per Keith's blog: https://rkeithhill.wordpress.com/2016/02/17/creating-a-powershell-command-that-process-paths-using-visual-studio-code/

DTW-DanWard avatar Sep 07 '17 02:09 DTW-DanWard