From ab85c7eb4fde78db5439fe75ae612246064c77fc Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Tue, 25 Aug 2009 09:22:20 +0000 Subject: fix updates on Windows git-svn-id: svn://tug.org/texlive/trunk@14853 c570f23f-e606-0410-a88d-b1316a301751 --- Master/tlpkg/TeXLive/TLPDB.pm | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'Master/tlpkg/TeXLive/TLPDB.pm') 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 -- cgit v1.2.3