Uh oh!
There was an error while loading. Please reload this page.
Don't let remove_dir_all recursively remove a symlink - #31468
Conversation
rust-highfive
commented
Feb 7, 2016
(rust_highfive has picked a reviewer for you, use r? to override) |
| } else { | ||
| remove_dir_all_recursive(path) | ||
| } | ||
| } |
There was a problem hiding this comment.
This logic looks pretty similar between here and windows, perhaps it could be lifted to std::fs and leave the recursive bits to the platform-specific modules?
There was a problem hiding this comment.
The Windows version is similar but a bit tricky. It uses rmdir() so it can only remove directory symlinks and not file symlinks. Unix just uses unlink(). But I don't mind if we make the distinction here or in std::fs.
alexcrichton
commented
Feb 7, 2016
Looks good to me, thanks @pitdicker! |
alexcrichton
commented
Feb 7, 2016
bors
commented
Feb 7, 2016
⌛ Testing commit d47036c with merge 227f399... |
pitdicker
commented
Feb 7, 2016
O, I am very sorry. I only tested with symlinking permissions, not also without. The build will fail |
See #29412