From f428f211fac3aa2a0e51a31f11b15a0cf2d0786c Mon Sep 17 00:00:00 2001 From: Brett Parker Date: Tue, 25 May 2010 09:41:43 +0100 Subject: [PATCH 1/1] * Check image exists in size matching code --- bpgallery.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/bpgallery.sh b/bpgallery.sh index 4f421c9..dc8780f 100755 --- a/bpgallery.sh +++ b/bpgallery.sh @@ -543,6 +543,10 @@ function check_dimensions() { wantedheight=$2 dir=$3 filename=$4 + if [ ! -e "$dir/$filename" ]; then + echo 0 + return + fi iconwidth=$($IDENTIFYCOMMAND -format "%wx%h" "$dir/$filename") iconheight=${iconwidth//*x} iconwidth=${iconwidth//x*} -- 2.39.5