cookutils diff modules/compressor @ rev 1068

modules/compressor: compress_gif(): resulting file may be absent even if $?=0; lighttpd/index.cgi: avoid "flickering", show previous webstat values before updating
author Aleksej Bobylev <al.bobylev@gmail.com>
date Wed Jun 06 13:32:26 2018 +0300 (2018-06-06)
parents 9c90eaa721d2
children 23700c523fdb
line diff
     1.1 --- a/modules/compressor	Wed Jun 06 01:42:12 2018 +0300
     1.2 +++ b/modules/compressor	Wed Jun 06 13:32:26 2018 +0300
     1.3 @@ -403,7 +403,7 @@
     1.4  			unset IFS
     1.5  			# use intermediate file, if all well ($?=0), then substitute the original
     1.6  			if gifsicle -O3 "$i" -o "$i.$$" >> "$the_log" 2>&1; then
     1.7 -				mv "$i.$$" "$i"
     1.8 +				if [ -s "$i.$$" ]; then mv "$i.$$" "$i"; fi
     1.9  			else
    1.10  				rm "$i.$$"
    1.11  			fi