summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Master/tlpkg/TeXLive/TLPDB.pm14
1 files changed, 11 insertions, 3 deletions
diff --git a/Master/tlpkg/TeXLive/TLPDB.pm b/Master/tlpkg/TeXLive/TLPDB.pm
index ca4c1b496df..34f924fb2c0 100644
--- a/Master/tlpkg/TeXLive/TLPDB.pm
+++ b/Master/tlpkg/TeXLive/TLPDB.pm
@@ -333,11 +333,19 @@ sub save {
my $path = $self->location;
mkdirhier(dirname($path));
my $tmppath = "$path.tmp";
- open(FOO, ">$tmppath") || die "$0: open(>$tmppath) failed: $!";
+ #
+ # on Windows we cannot move the stuff, at least I don't know how
+ if (win32()) {
+ open(FOO, ">$path") || die "$0: open(>$path) failed: $!";
+ } else {
+ 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);
+ if (unix()) {
+ # if we managed that one, we move it over
+ rename($tmppath, $path);
+ }
}
=pod