diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2004-01-07 16:37:30 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2004-01-07 16:37:30 +0000 |
commit | dacd47b22374d602709a46ea70930cb43c01a069 (patch) | |
tree | f1e8b0b37f9ff7da440e661bebee7fc1b0ec91bf | |
parent | 57035179187542b3c57ce162d61d72bccb552bb4 (diff) | |
download | perl-MDK-Common-dacd47b22374d602709a46ea70930cb43c01a069.tar perl-MDK-Common-dacd47b22374d602709a46ea70930cb43c01a069.tar.gz perl-MDK-Common-dacd47b22374d602709a46ea70930cb43c01a069.tar.bz2 perl-MDK-Common-dacd47b22374d602709a46ea70930cb43c01a069.tar.xz perl-MDK-Common-dacd47b22374d602709a46ea70930cb43c01a069.zip |
check the name given to whereis_binary() doesn't contain a "/"
-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; |