# HG changeset patch # User Aleksej Bobylev # Date 1528281146 -10800 # Node ID c1db2b6009d028eeb7ceb22d6cffce3f617d7714 # Parent 9c90eaa721d24f41f48d0348d86bb1f635f475b4 modules/compressor: compress_gif(): resulting file may be absent even if $?=0; lighttpd/index.cgi: avoid "flickering", show previous webstat values before updating diff -r 9c90eaa721d2 -r c1db2b6009d0 lighttpd/index.cgi --- a/lighttpd/index.cgi Wed Jun 06 01:42:12 2018 +0300 +++ b/lighttpd/index.cgi Wed Jun 06 13:32:26 2018 +0300 @@ -880,7 +880,8 @@ case $1 in webstat) echo -n "
" - show_note i 'Please wait while statistics are being collected.' + # Show previous webstat, it will be updated seamless then + nojs=1; part webstat noupdate echo "
" ;; *) @@ -915,7 +916,7 @@ ;; webstat) # Do we need to update the statistics? - [ "$webstat" -nt "$activity" ] || update_webstat + [ -z "$2" -a "$webstat" -nt "$activity" ] || update_webstat . $webstat pct=0; [ "$rtotal" -gt 0 ] && pct=$(( ($rcooked * 100) / $rtotal )) diff -r 9c90eaa721d2 -r c1db2b6009d0 modules/compressor --- a/modules/compressor Wed Jun 06 01:42:12 2018 +0300 +++ b/modules/compressor Wed Jun 06 13:32:26 2018 +0300 @@ -403,7 +403,7 @@ unset IFS # use intermediate file, if all well ($?=0), then substitute the original if gifsicle -O3 "$i" -o "$i.$$" >> "$the_log" 2>&1; then - mv "$i.$$" "$i" + if [ -s "$i.$$" ]; then mv "$i.$$" "$i"; fi else rm "$i.$$" fi