diff options
-rw-r--r-- | MDK/Common/System.pm | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/MDK/Common/System.pm b/MDK/Common/System.pm index 5ecdc86..d8fa388 100644 --- a/MDK/Common/System.pm +++ b/MDK/Common/System.pm @@ -291,6 +291,10 @@ sub unix2dos { local $_ = $_[0]; s/\015$//mg; s/$/\015/mg; $_ } sub whereis_binary { my ($prog) = @_; + if ($prog =~ m!/!) { + warn "don't call whereis_binary with a name containing a \"/\" (the culprit is: $prog)\n"; + return; + } foreach (split(':', $ENV{PATH})) { my $f = "$_/$prog"; -x $f and return $f; |