Commit b399f490 authored by Dylan Araps's avatar Dylan Araps

ascii: Fixed bug when files named auto or ascii were found.

parent defee48d
...@@ -3417,12 +3417,12 @@ image_backend() { ...@@ -3417,12 +3417,12 @@ image_backend() {
} }
get_ascii() { get_ascii() {
if [[ -f "$image_source" && ! "$image_source" =~ (png|jpg|jpeg|jpe|svg|gif) ]]; then [[ ! "$image_source" =~ (ascii|auto) ]] &&
ascii_data="$(< "$image_source")" if [[ -f "$image_source" && ! "$image_source" =~ (png|jpg|jpeg|jpe|svg|gif) ]]; then
ascii_data="$(< "$image_source")"
elif [[ "$image_source" != "auto" ]]; then else
ascii_data="$image_source" ascii_data="$image_source"
fi fi
# Set locale to get correct padding. # Set locale to get correct padding.
LC_ALL="$sys_locale" LC_ALL="$sys_locale"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment