summaryrefslogtreecommitdiff
path: root/Master/tlpkg/TeXLive
diff options
context:
space:
mode:
authorSiep Kroonenberg <siepo@cybercomm.nl>2015-05-06 20:30:33 +0000
committerSiep Kroonenberg <siepo@cybercomm.nl>2015-05-06 20:30:33 +0000
commit4524788b22f158e5013c44687b7bd77b2c0c9d9e (patch)
tree36354060dec662ab65a1b0d44509095e95efaad4 /Master/tlpkg/TeXLive
parent17cc3051edd2c1364dc5d10af723cdbb3c24293f (diff)
Do not create shortcut for missing target
git-svn-id: svn://tug.org/texlive/trunk@37234 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/tlpkg/TeXLive')
-rw-r--r--Master/tlpkg/TeXLive/TLUtils.pm10
1 files changed, 8 insertions, 2 deletions
diff --git a/Master/tlpkg/TeXLive/TLUtils.pm b/Master/tlpkg/TeXLive/TLUtils.pm
index cf8389dbaac..af276fbaebc 100644
--- a/Master/tlpkg/TeXLive/TLUtils.pm
+++ b/Master/tlpkg/TeXLive/TLUtils.pm
@@ -1876,9 +1876,15 @@ sub _do_postaction_shortcut {
# $cmd can be an URL, in which case we do NOT want to convert it to
# w32 paths!
if ($cmd !~ m!^\s*(http://|ftp://)!) {
+ if (!(-e $cmd) or !(-r $cmd)) {
+ tlwarn("Target of shortcut action does not exist: $cmd\n")
+ if $cmd =~ /\.(exe|bat|cmd)$/i;
+ # if not an executable, just omit shortcut silently
+ return 0;
+ }
$cmd = conv_to_w32_path($cmd);
}
- if ($type eq "menu") {
+ if ($type eq "menu" ) {
TeXLive::TLWinGoo::add_menu_shortcut(
$TeXLive::TLConfig::WindowsMainMenuName,
$name, $icon, $cmd, $args, $hide);
@@ -3522,7 +3528,7 @@ sub conv_to_w32_path {
my $p = shift;
# we need absolute paths, too
my $pabs = tl_abs_path($p);
- if (not defined $pabs) {
+ if (not $pabs) {
$pabs = $p;
tlwarn ("sorry, could not determine absolute path of $p!\n".
"using original path instead");