From 1a519845c5554217506cdfc5e9478e02e379dd9e Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Mon, 4 May 2020 10:06:57 -0700 Subject: [PATCH] Fixed issue when trash is empty --- bin | 2 ++ 1 file changed, 2 insertions(+) diff --git a/bin b/bin index 69941a0..0f2fd0f 100755 --- a/bin +++ b/bin @@ -61,6 +61,7 @@ find_trashfile() { best_file= best_date=0 for f in "$td/files"/*; do + [ -e "$f" ] || continue info="$td/info/$(basename "$f").trashinfo" path="$(path_from_trashinfo "$info")" date="$(date +"%s" -d "$(date_from_trashinfo "$info")")" @@ -251,6 +252,7 @@ list_trash() { for target; do td="$(get_trashdir "$(readlink -f -- "$target")")" for f in "$td/files"/*; do + [ -e "$f" ] || continue printf '%s'"$FS"'%s'"$FS"'%s'"$RS" \ "$f" "$(date_from_trashinfo "$td/info/$(basename "$f").trashinfo")" \ "$(path_from_trashinfo "$td/info/$(basename "$f").trashinfo")"