From 1b88cd5ee8510e90e69f885bfd730ce57621781c Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 4 May 2024 03:11:49 +0200 Subject: Adding upstream version 3:4.8.31. Signed-off-by: Daniel Baumann --- misc/ext.d/image.sh | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'misc/ext.d/image.sh') diff --git a/misc/ext.d/image.sh b/misc/ext.d/image.sh index 04307e0..c191225 100755 --- a/misc/ext.d/image.sh +++ b/misc/ext.d/image.sh @@ -12,14 +12,19 @@ do_view_action() { filetype=$1 case "${filetype}" in - jpeg) - identify "${MC_EXT_FILENAME}" - which exif >/dev/null 2>&1 && exif "${MC_EXT_FILENAME}" 2>/dev/null - ;; xpm) - sxpm "${MC_EXT_FILENAME}" + [ -n "$DISPLAY" ] && sxpm "${MC_EXT_FILENAME}" ;; *) + if which exif >/dev/null 2>&1; then + exif "${MC_EXT_FILENAME}" 2>/dev/null + E=$? + else + E=1 + fi + if [ $E != 0 ] && which exiftool >/dev/null 2>&1; then + exiftool "${MC_EXT_FILENAME}" 2>/dev/null + fi identify "${MC_EXT_FILENAME}" ;; esac -- cgit v1.2.3