diff options
Diffstat (limited to 'Master/tlpkg')
-rw-r--r-- | Master/tlpkg/TeXLive/TLPDB.pm | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Master/tlpkg/TeXLive/TLPDB.pm b/Master/tlpkg/TeXLive/TLPDB.pm index c2780c8c647..ca4c1b496df 100644 --- a/Master/tlpkg/TeXLive/TLPDB.pm +++ b/Master/tlpkg/TeXLive/TLPDB.pm @@ -332,9 +332,12 @@ sub save { my $self = shift; my $path = $self->location; mkdirhier(dirname($path)); - open(FOO, ">$path") || die "$0: open(>$path) failed: $!"; + my $tmppath = "$path.tmp"; + open(FOO, ">$tmppath") || die "$0: open(>$tmppath) failed: $!"; $self->writeout(\*FOO); close(FOO); + # if we managed that one, we move it over + rename($tmppath, $path); } =pod |