Skip to content

Conversation

@iSazonov
Copy link
Collaborator

@iSazonov iSazonov commented Apr 17, 2021

PR Summary

Fix #15248.

Partial regression after #14902. Partial because there are other code paths (a path comes from public with trailing backslash) which can raise an issue in the place.

Docs say that FindFirstFileEx does not accept a path a trailing backslash (\).

The fix is always removing a trailing backslash from path string before calling FindFirstFileEx.

Second commit reformat old tests (remove tabs).

PR Context

PR Checklist

@iSazonov iSazonov added the CL-General Indicates that a PR should be marked as a general cmdlet change in the Change Log label Apr 17, 2021
@iSazonov iSazonov requested review from SteveL-MSFT and rjmholt April 17, 2021 13:03
@iSazonov iSazonov requested a review from anmenaga as a code owner April 17, 2021 13:03
@ghost ghost assigned anmenaga Apr 17, 2021
@iSazonov iSazonov closed this Apr 17, 2021
@iSazonov iSazonov deleted the fix-isreparsepointlikesymlink branch April 17, 2021 14:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CL-General Indicates that a PR should be marked as a general cmdlet change in the Change Log

Projects

None yet

Development

Successfully merging this pull request may close these issues.

On Windows, Remove-Item unexpectedly fails if the target directory path happens to end in a backslash

2 participants