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

This commit is contained in:
Dylan Araps 2019-01-07 18:17:56 +02:00
parent defee48d14
commit b399f49077
1 changed files with 6 additions and 6 deletions

View File

@ -3417,10 +3417,10 @@ image_backend() {
}
get_ascii() {
[[ ! "$image_source" =~ (ascii|auto) ]] &&
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"
fi