Fixed issue when trash is empty

This commit is contained in:
Bruce Hill 2020-05-04 10:06:57 -07:00
parent c459ac0b67
commit 1a519845c5

2
bin
View File

@ -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")"