Skip to content

Fix trashing on overlayfs

Iain Lane requested to merge fix-overlayfs-trashing-1027 into master

In order to determine whether to trash a file to the home directory, we compare its st_dev to our home directory's st_dev field.

This is the wrong thing to do on overlayfs when deleting files, because st_dev contains the ID of the filesystem providing the file (which can be the lower or upper filesystem), but directories always return the ID of the overlayfs. Thus the comparison fails and we are unable to trash the file.

Fix this by checking st_dev of the parent directory when we are deleting a file.

Fixes #1027 (closed).

Merge request reports