From: Brett Parker Date: Tue, 25 May 2010 08:41:43 +0000 (+0100) Subject: * Check image exists in size matching code X-Git-Tag: release-1.1.4~1 X-Git-Url: https://git.sommitrealweird.co.uk/bpgallery.git/commitdiff_plain/f428f211fac3aa2a0e51a31f11b15a0cf2d0786c?ds=inline;hp=10352e437ec87446fb08768a997868f0fbccc540 * Check image exists in size matching code --- 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*}