# HG changeset patch # User meillo@marmaro.de # Date 1214247475 -7200 # Node ID d1ad806b6ee3f36dce906809eb1b3c264037c591 # Parent b991e188f1fab298ed9eef8c410c3b83ff849cb6 picsize and thumbsize are now numbers in any case (used printf); non-regular and non-existent files are skipped diff -r b991e188f1fa -r d1ad806b6ee3 TODO --- a/TODO Mon Jun 23 20:05:50 2008 +0200 +++ b/TODO Mon Jun 23 20:57:55 2008 +0200 @@ -2,10 +2,7 @@ - security checks -- navigation in pic pages (really?) - - verify that input files are images - convert doesnt always return an error code if it is no supported image type + mogrify doesnt always return an error code if it is no supported image type so is the problem with gimp's xcf format - -- verify picture and thumbnail sizes are numbers + (is that solvable in any case??) diff -r b991e188f1fa -r d1ad806b6ee3 genwebgallery --- a/genwebgallery Mon Jun 23 20:05:50 2008 +0200 +++ b/genwebgallery Mon Jun 23 20:57:55 2008 +0200 @@ -202,12 +202,12 @@ shift ;; '-ps' | '--pic-size') - sizePic="$2" + sizePic="`echo "$2" | awk '{printf("%d",$0)}'`" shift shift ;; '-ts' | '--thumb-size') - sizeThumb="$2" + sizeThumb="`echo "$2" | awk '{printf("%d",$0)}'`" shift shift ;; @@ -255,6 +255,13 @@ fi for i in "$@" ; do + # skip over invalid files + if [ ! -f "$i" ] ; then + log "does not exist, or no regular file: $i" + log " skipping" + continue + fi + file="`basename $i`" targetFile="$targetDir/$file.htm" log "processing file: $file"