* Check image exists in size matching code
[bpgallery.git] / bpgallery.sh
index 4f421c9f0116765f7f1a99b59ccfb4ecf427cab9..dc8780f486cf301b8d806c705222c78d1454250c 100755 (executable)
@@ -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*}