Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fine-grained error messages for remove_dir_all #17

Open
andrewhickman opened this issue Mar 6, 2020 · 4 comments
Open

Fine-grained error messages for remove_dir_all #17

andrewhickman opened this issue Mar 6, 2020 · 4 comments
Labels
enhancement New feature or request

Comments

@andrewhickman
Copy link
Owner

andrewhickman commented Mar 6, 2020

The standard library implements remove_dir_all in terms of multiple operations. We should provide an error message detailing exactly which of these failed.

This is straightforward on most platforms. The implementation can be replicated using existing APIs. Unfortunately the windows implementation uses the unstable FileTypeExt::is_symlink_dir

We can work around this by using winapi directly, or waiting for the method to stabilize

@andrewhickman andrewhickman added the enhancement New feature or request label Mar 6, 2020
@LPGhatguy
Copy link
Collaborator

It looks like you closed this in f61ae29

I noticed after pulling from master and being surprised, I didn't read this commit on GitHub because of its message! 😅

@LPGhatguy LPGhatguy reopened this Mar 17, 2020
@LPGhatguy
Copy link
Collaborator

Actually, it looks like that commit broke building on Windows and might've been unintentional. Do we want to back it out?

@andrewhickman
Copy link
Owner Author

That was indeed unintentional, thanks for pointing it out 😄

@andrewhickman
Copy link
Owner Author

FileTypeExt::is_symlink_dir is stable as of Rust 1.64.0. It would be a shame to impose a MSRV just for this, but maybe this could be implemented as an optional feature

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants