simplify logic in find_media function

This commit is contained in:
ksyasuda 2022-02-20 19:11:14 -08:00
parent d7bd5899b5
commit 8fb570b003

View File

@ -408,13 +408,9 @@ find_media() {
case "$selection" in case "$selection" in
Back | ../) Back | ../)
dotdotslash="${inp%/*}" dotdotslash="${inp%/*}"
if [ -z "$dotdotslash" ]; then [ -z "$dotdotslash" ] && dotdotslash="/"
insert_history "directory" "/"
find_media "/"
else
insert_history "directory" "$dotdotslash" insert_history "directory" "$dotdotslash"
find_media "$dotdotslash" find_media "$dotdotslash"
fi
;; ;;
Quit) Quit)
return 1 return 1