Image shuffle: path no longer requires a '/' - @aranega

This commit is contained in:
Dylan Araps 2016-06-10 23:10:54 +10:00
parent b854e4a148
commit 470afe9509
1 changed files with 1 additions and 1 deletions

View File

@ -2265,7 +2265,7 @@ getimage () {
"ascii") getascii; return ;; "ascii") getascii; return ;;
*) *)
if [ -d "$image" ]; then if [ -d "$image" ]; then
files=("$image"*.{png,jpg,jpeg}) files=("${image%/}"/*.{png,jpg,jpeg})
img="$(printf "%s" "${files[RANDOM % (${#files[@]} - 1)]}")" img="$(printf "%s" "${files[RANDOM % (${#files[@]} - 1)]}")"
else else
img="$image" img="$image"