Fixed issue when trash is empty
This commit is contained in:
parent
c459ac0b67
commit
1a519845c5
2
bin
2
bin
@ -61,6 +61,7 @@ find_trashfile() {
|
|||||||
best_file=
|
best_file=
|
||||||
best_date=0
|
best_date=0
|
||||||
for f in "$td/files"/*; do
|
for f in "$td/files"/*; do
|
||||||
|
[ -e "$f" ] || continue
|
||||||
info="$td/info/$(basename "$f").trashinfo"
|
info="$td/info/$(basename "$f").trashinfo"
|
||||||
path="$(path_from_trashinfo "$info")"
|
path="$(path_from_trashinfo "$info")"
|
||||||
date="$(date +"%s" -d "$(date_from_trashinfo "$info")")"
|
date="$(date +"%s" -d "$(date_from_trashinfo "$info")")"
|
||||||
@ -251,6 +252,7 @@ list_trash() {
|
|||||||
for target; do
|
for target; do
|
||||||
td="$(get_trashdir "$(readlink -f -- "$target")")"
|
td="$(get_trashdir "$(readlink -f -- "$target")")"
|
||||||
for f in "$td/files"/*; do
|
for f in "$td/files"/*; do
|
||||||
|
[ -e "$f" ] || continue
|
||||||
printf '%s'"$FS"'%s'"$FS"'%s'"$RS" \
|
printf '%s'"$FS"'%s'"$FS"'%s'"$RS" \
|
||||||
"$f" "$(date_from_trashinfo "$td/info/$(basename "$f").trashinfo")" \
|
"$f" "$(date_from_trashinfo "$td/info/$(basename "$f").trashinfo")" \
|
||||||
"$(path_from_trashinfo "$td/info/$(basename "$f").trashinfo")"
|
"$(path_from_trashinfo "$td/info/$(basename "$f").trashinfo")"
|
||||||
|
Loading…
Reference in New Issue
Block a user