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

Failed to move files to trash in overlayfs #74

Open
pjknkda opened this issue Nov 11, 2022 · 1 comment
Open

Failed to move files to trash in overlayfs #74

pjknkda opened this issue Nov 11, 2022 · 1 comment

Comments

@pjknkda
Copy link

pjknkda commented Nov 11, 2022

In overlayfs, directories always have st_dev from lower filesystem whereas files can have st_dev either from lower filesystem or upper filesystem.
Due to this behavior, https://github.com/arsenetar/send2trash/blob/1.8.1b0/send2trash/plat_other.py#L178 always fails when the file's st_dev is from the upper filesystem.
gio already tackled this issue, by avoiding comparison b/w file_dev and trash_dev, instead, it compares parent_dir(file).dev to trash_dev (ref: https://gitlab.gnome.org/GNOME/glib/-/blob/main/gio/glocalfile.c#L2019).
I think send2trash also can adapt the same approach.

@arsenetar
Copy link
Owner

Thanks for the information on the gio approach likely that can be leveraged here as well, will look into that. The st_dev has been somewhat problematic in I believe more than one case.

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

No branches or pull requests

2 participants