-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix removing symbolic links to directories on Windows
Update the implementation of `rm::remove` to, conditionally on the target platform, remove symbolic files either: 1. On non-Windows systems always as files (unchanged), or 2. On Windows systems as either a directory or file depending on what the link is pointing to. The latter is necessary for removal of symbolic links on Windows because otherwise users will get a `PermissionDenied` error. All tests that were disabled on Windows for this reason previously now run conditionally on the `test-symlink` test feature, just like all other symlink-related tests. Except for the unit test named `symlink_to_ dir_at_ location_of_a_dir_toctou`. With the current implementation of the `remove` function this TOCTOU scenario is handled differently on Windows from non-Windows systems, but both outcomes are considered okay (both versions of the test are kept to notice changes/regressions on any platform).
- Loading branch information
1 parent
2ca34c1
commit 20a3d57
Showing
4 changed files
with
73 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters