summaryrefslogtreecommitdiff
path: root/Master/tlpkg
diff options
context:
space:
mode:
authorNorbert Preining <preining@logic.at>2019-09-27 00:31:10 +0000
committerNorbert Preining <preining@logic.at>2019-09-27 00:31:10 +0000
commit58751f3663f58918a53bfa57291c4032c14b583f (patch)
tree7d22c812342d7fe2a390d2d885605ba0af9aa5e8 /Master/tlpkg
parent1e05432296e7edf7ddcb7b78711efdaf47c6fefc (diff)
fix TLUtils::copy failure to deal with links properly
git-svn-id: svn://tug.org/texlive/trunk@52189 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/tlpkg')
-rw-r--r--Master/tlpkg/TeXLive/TLUtils.pm6
1 files changed, 4 insertions, 2 deletions
diff --git a/Master/tlpkg/TeXLive/TLUtils.pm b/Master/tlpkg/TeXLive/TLUtils.pm
index 9904dac4742..e7aef738ec0 100644
--- a/Master/tlpkg/TeXLive/TLUtils.pm
+++ b/Master/tlpkg/TeXLive/TLUtils.pm
@@ -1143,8 +1143,10 @@ sub copy {
}
if (-l "$infile") {
- symlink (readlink $infile, "$destdir/$filename")
- || die "symlink(readlink $infile, $destdir/$filename) failed: $!";
+ # the link target might be relative, so we need to start from
+ # the directory of $infile for the link
+ symlink (Cwd::abs_path(dirname($infile)) . "/" . readlink($infile), "$destdir/$filename")
+ || die "symlink(dirname($infile) . \"/\" . readlink($infile), $destdir/$filename) failed: $!";
} else {
if (! open (IN, $infile)) {
warn "open($infile) failed, not copying: $!";