Index: openacs-4/packages/acs-tcl/tcl/utilities-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/utilities-procs.tcl,v diff -u -N -r1.189.2.30 -r1.189.2.31 --- openacs-4/packages/acs-tcl/tcl/utilities-procs.tcl 31 Oct 2019 18:12:49 -0000 1.189.2.30 +++ openacs-4/packages/acs-tcl/tcl/utilities-procs.tcl 7 Nov 2019 13:11:35 -0000 1.189.2.31 @@ -4389,7 +4389,15 @@ # as well. # if {$gzip ne ""} { - exec $gzip -9 -k $local_path/$file + # By default gzip would delete the original + # file. Versions >= 1.6 would support the -k flag to + # keep it, but as installations around might ship with + # older versions we mimick this behavior in tcl. + set tmpfile [ad_tmpnam] + file copy -- $local_path/$file $tmpfile + # exec $gzip -9 -k $local_path/$file + exec $gzip -9 $local_path/$file + file rename -- $tmpfile $local_path/$file } }