mirror of
https://github.com/ksyasuda/aniwrapper.git
synced 2024-11-22 03:19:53 -08:00
change find media function to be tail recursive?
This commit is contained in:
parent
e8944dcc69
commit
e5bb21b4e1
7
ani-cli
7
ani-cli
@ -407,16 +407,15 @@ find_media() {
|
|||||||
return 1
|
return 1
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
if [ -d "$inp/$selection" ] || [ -f "$inp/$selection" ]; then
|
if [ ! -d "$inp/$selection" ] && [ ! -f "$inp/$selection" ]; then
|
||||||
|
return 1
|
||||||
|
else
|
||||||
insert_history "directory" "$inp/$selection" &
|
insert_history "directory" "$inp/$selection" &
|
||||||
if [ "$inp" = "/" ]; then
|
if [ "$inp" = "/" ]; then
|
||||||
find_media "/$selection"
|
find_media "/$selection"
|
||||||
else
|
else
|
||||||
find_media "$inp/$selection"
|
find_media "$inp/$selection"
|
||||||
fi
|
fi
|
||||||
return $?
|
|
||||||
else
|
|
||||||
return 1
|
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
Loading…
Reference in New Issue
Block a user