diff --git a/neofetch b/neofetch index 047039aa..8781466a 100755 --- a/neofetch +++ b/neofetch @@ -2265,7 +2265,7 @@ getimage () { "ascii") getascii; return ;; *) if [ -d "$image" ]; then - files=("$image"*.{png,jpg,jpeg}) + files=("${image%/}"/*.{png,jpg,jpeg}) img="$(printf "%s" "${files[RANDOM % (${#files[@]} - 1)]}")" else img="$image"