-
Notifications
You must be signed in to change notification settings - Fork 30
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
Unable to delete file on Windows shared folder #55
Comments
Thanks for letting us know. What's the version of this crate you were using? Is there a minimal program you can post here that would reproduce the issue, assuming the file to be deleted is on a Samba mount? Thanks. |
The following code: use trash;
fn main() {
trash::delete(r"Z:\z.txt").unwrap();
} errors out with message:
while the following code works: use std::fs;
fn main() {
fs::remove_file(r"Z:\z.txt").unwrap();
} I'm on:
|
Thanks a lot, that should help. Note: I have a hunch this is related to a path-processing step happening when using trash, maybe canonicalization. There is an alternative implementation of this, |
For your info, when you delete a file on a shared folder from Windows File Explorer, the file is deleted permanently and not moved to the trash bin. I guess this is to avoid copying files through the network. So when a file is on a shared folder maybe you could just issue |
I tried to delete a file on a Windows shared folder (it is on a NAS, shared through Samba). I get the following error message:
The text was updated successfully, but these errors were encountered: