diff options
author | Piotr Strzelczyk <piotr@eps.gda.pl> | 2009-09-03 23:36:09 +0000 |
---|---|---|
committer | Piotr Strzelczyk <piotr@eps.gda.pl> | 2009-09-03 23:36:09 +0000 |
commit | d6479f15e67cc2dec0f8610a496dc781cd6d7bed (patch) | |
tree | cb3180834e391f60e1a99773bf4e0197fb6142e1 /Master/tlpkg/TeXLive/TLUtils.pm | |
parent | c09abf83aa0db5336a83fb948c865d2b819811d0 (diff) |
use the same code for win32 and unix
git-svn-id: svn://tug.org/texlive/trunk@15047 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/tlpkg/TeXLive/TLUtils.pm')
-rw-r--r-- | Master/tlpkg/TeXLive/TLUtils.pm | 21 |
1 files changed, 6 insertions, 15 deletions
diff --git a/Master/tlpkg/TeXLive/TLUtils.pm b/Master/tlpkg/TeXLive/TLUtils.pm index 4a05df23939..0fb03877d27 100644 --- a/Master/tlpkg/TeXLive/TLUtils.pm +++ b/Master/tlpkg/TeXLive/TLUtils.pm @@ -544,21 +544,12 @@ sub dir_writable { my $i = 0; while (-e $path . "/" . $i) { $i++; } my $f = $path."/".$i; - if (win32) { - my $fb = $f; - $fb =~ s!/!\\!g; - return 0 if - system('copy /b nul "' . $fb . '" >nul 2>&1'); - unlink $f if -e $f; - return 1; - } else { - return 0 unless open TEST, ">".$f; - my $written = 0; - $written = (print TEST "\n"); - close TEST; - unlink $f; - return $written; - } + return 0 unless open TEST, ">".$f; + my $written = 0; + $written = (print TEST "\n"); + close TEST; + unlink $f; + return $written; } |