PathUtils: handle escaped -Path correctly#7405
PathUtils: handle escaped -Path correctly#7405kwkam wants to merge 2 commits intoPowerShell:masterfrom
Conversation
Unescape non-literal, non-glob path before calling GetUnresolvedProviderPathFromPSPath since it only accepts literal path. This solve the issue where some commands depending on that method will treat -Path as literal unintentionally. For example, > Out-File -Path './`[out`].txt' -Append will create a new file named "`[out`].txt" instead of writing to "[out].txt".
|
This PR has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed if no further activity occurs within 10 days. |
|
This PR has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed if no further activity occurs within 10 days. |
|
This PR has be automatically close because it is stale. If you wish to continue working on the PR, please first update the PR, then reopen it. |
|
This also cannot be reopened. Do I have to create a new PR? |
PR Summary
Unescape non-literal, non-glob path before calling
GetUnresolvedProviderPathFromPSPath since it only accepts literal path.
This solve the issue where some commands depending on that method
will treat -Path as literal unintentionally. For example,
will create a new file named
"`[out`].txt"instead of writing to"[out].txt".PR Checklist
.h,.cpp,.cs,.ps1and.psm1files have the correct copyright headerWIP:to the beginning of the title and remove the prefix when the PR is ready.[feature]if the change is significant or affects feature tests