Skip to content

Commit

Permalink
Fix trashing files on Fedora Atomic variants
Browse files Browse the repository at this point in the history
  • Loading branch information
sungsphinx committed Aug 26, 2024
1 parent 26e55ae commit 4d22ee4
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/freedesktop.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@ impl TrashContext {
// Note that the following function creates the trash folder
// and its required subfolders in case they don't exist.
move_to_trash(path, &home_trash, topdir).map_err(|(p, e)| fs_error(p, e))?;
} else if topdir.to_str() == Some("/var/home") && home_topdir.to_str() == Some("/") {
debug!("The topdir is '/var/home' but the home_topdir is '/', moving to the home trash anyway.");
move_to_trash(path, &home_trash, topdir).map_err(|(p, e)| fs_error(p, e))?;
} else {
execute_on_mounted_trash_folders(uid, topdir, true, true, |trash_path| {
move_to_trash(&path, trash_path, topdir)
Expand Down

0 comments on commit 4d22ee4

Please sign in to comment.