summaryrefslogtreecommitdiff
path: root/Master
diff options
context:
space:
mode:
authorNorbert Preining <preining@logic.at>2008-12-25 23:42:56 +0000
committerNorbert Preining <preining@logic.at>2008-12-25 23:42:56 +0000
commit117e69b02577f23fd465af4635215c822abf9ff8 (patch)
tree6967ecb2560e26e457ca6fdbf6dac4b00f36a219 /Master
parent7f387c3f9d7a30233eb5646730f63b101cc92ba0 (diff)
check return value of link command
git-svn-id: svn://tug.org/texlive/trunk@11719 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rw-r--r--Master/tlpkg/TeXLive/TLPDB.pm11
1 files changed, 7 insertions, 4 deletions
diff --git a/Master/tlpkg/TeXLive/TLPDB.pm b/Master/tlpkg/TeXLive/TLPDB.pm
index 3d201b25224..ffe004d2053 100644
--- a/Master/tlpkg/TeXLive/TLPDB.pm
+++ b/Master/tlpkg/TeXLive/TLPDB.pm
@@ -923,8 +923,7 @@ sub config_revision {
These two functions try to create/remove symlinks for binaries, man pages,
and info files as specified by the options saved in the tlpdb
-($tlpdb->option_create_symlinks, $tlpdb->option_sys_bin,
-$tlpdb->option_sys_man, $tlpdb->option_sys_info).
+($tlpdb->option_sys_bin, $tlpdb->option_sys_man, $tlpdb->option_sys_info).
The functions return 1 on success and 0 on error.
On Windows it returns undefined.
@@ -937,11 +936,15 @@ sub link_dir_dir {
if (-w $to) {
debug("linking files from $from to $to\n");
chomp (@files = `ls "$from"`);
+ my $ret = 1;
for my $f (@files) {
unlink("$to/$f");
- system("ln -s \"$from/$f\" \"$to\"");
+ if (system("ln -s \"$from/$f\" \"$to\"")) {
+ tlwarn("Linking $f from $from to $to failed: $!\n");
+ $ret = 0;
+ }
}
- return 1;
+ return $ret;
} else {
tlwarn("destination $to not writable, no linking files in $from done.\n");
return 0;