summaryrefslogtreecommitdiff
path: root/Master/tlpkg/TeXLive/TLPDB.pm
diff options
context:
space:
mode:
authorNorbert Preining <preining@logic.at>2009-08-25 09:22:20 +0000
committerNorbert Preining <preining@logic.at>2009-08-25 09:22:20 +0000
commitab85c7eb4fde78db5439fe75ae612246064c77fc (patch)
tree2ef335c2b716ae2bffcc35fdbf620844cb801776 /Master/tlpkg/TeXLive/TLPDB.pm
parent11e6b44bc6d66f1534f6bb185225ab7d3097e6a6 (diff)
fix updates on Windows
git-svn-id: svn://tug.org/texlive/trunk@14853 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/tlpkg/TeXLive/TLPDB.pm')
-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