summaryrefslogtreecommitdiff
path: root/Master/tlpkg/TeXLive
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2011-06-17 23:06:16 +0000
committerKarl Berry <karl@freefriends.org>2011-06-17 23:06:16 +0000
commit371de7294db8f76cea8d6aa2e10b383f893c72c9 (patch)
tree1beb5de66de06d380c3dba83d6cddbe94c88c0e3 /Master/tlpkg/TeXLive
parentc5ba79ab743a65547af5f2b1efd0d6095c912e6c (diff)
revert dirname() change due to install warning
git-svn-id: svn://tug.org/texlive/trunk@23032 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/tlpkg/TeXLive')
-rw-r--r--Master/tlpkg/TeXLive/TLUtils.pm20
1 files changed, 5 insertions, 15 deletions
diff --git a/Master/tlpkg/TeXLive/TLUtils.pm b/Master/tlpkg/TeXLive/TLUtils.pm
index 0051bc91ff6..40f47ac6950 100644
--- a/Master/tlpkg/TeXLive/TLUtils.pm
+++ b/Master/tlpkg/TeXLive/TLUtils.pm
@@ -526,23 +526,13 @@ Return C<$path> with its trailing C</component> removed.
sub dirname {
my $path=shift;
- my $drive='';
- if (&win32) {
+ if (win32) {
$path=~s!\\!/!g;
}
- if ($path=~m!^[A-Za-z]\:!) {
- $path=~ s/^(.\:)(.*)/$1,$2/;
- ($drive, $path)=($1,$2);
- }
- if ($path=~m!/!) {
- $path=~m!(.*)/.*!; # works because of greedy matching
- my $dir=$1;
- if (length($dir)) { # dirname("foo/bar/baz") -> "foo/bar"
- return "$drive$dir";
- } else { # dirname("/baz") -> "/"
- return "$drive/";
- }
- } else { # dirname("ignore") -> "."
+ if ($path=~m!/!) { # dirname("foo/bar/baz") -> "foo/bar"
+ $path=~m!(.*)/.*!; # works because of greedy matching
+ return $1;
+ } else { # dirname("ignore") -> "."
return ".";
}
}