summaryrefslogtreecommitdiff
path: root/util/jsgen.pl
diff options
context:
space:
mode:
Diffstat (limited to 'util/jsgen.pl')
-rwxr-xr-xutil/jsgen.pl5
1 files changed, 4 insertions, 1 deletions
diff --git a/util/jsgen.pl b/util/jsgen.pl
index c677d791..36adea0d 100755
--- a/util/jsgen.pl
+++ b/util/jsgen.pl
@@ -184,7 +184,10 @@ sub save {
rename "$f~", $f or die $!;
- `$VNDB::JSGEN{gzip} -c '$f' >'$f.gz'` if $VNDB::JSGEN{gzip};
+ if($VNDB::JSGEN{gzip}) {
+ `$VNDB::JSGEN{gzip} -c '$f' >'$f.gz~'`;
+ rename "$f.gz~", "$f.gz";
+ }
}
sub jsgen {