From dfdf70b186366286dfd20daf2437a9d5d1d5ece9 Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Thu, 24 Mar 2016 21:33:17 +0100 Subject: impressive-display: Check if a filename is given _and_ if the file is readable. --- impressive-display/bin/impressive-display | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/impressive-display/bin/impressive-display b/impressive-display/bin/impressive-display index 196dd0b..d2be221 100755 --- a/impressive-display/bin/impressive-display +++ b/impressive-display/bin/impressive-display @@ -155,9 +155,7 @@ function stop_pdfdownload_loop { function pdf_is_portrait { check_pdffile=$1 - if [ -n "$check_pdffile" ]; then - - declare -i num_of_landscape_pages=0 + if [ -n "$check_pdffile" ] && [ -r "$check_pdffile" ]; then pdfinfo \ -f 1 \ -- cgit v1.2.3