]> Sergey Matveev's repositories - public-inbox.git/blobdiff - lib/PublicInbox/Spawn.pm
spawn: which: allow embedded slash for relative path
[public-inbox.git] / lib / PublicInbox / Spawn.pm
index e2868a559741b2416cdbba9960bf598434577c08..b946a66373b84faedaef1a71d02329a2cf8587fe 100644 (file)
@@ -178,7 +178,7 @@ unless (defined $vfork_spawn) {
 
 sub which ($) {
        my ($file) = @_;
-       return $file if index($file, '/') == 0;
+       return $file if index($file, '/') >= 0;
        foreach my $p (split(':', $ENV{PATH})) {
                $p .= "/$file";
                return $p if -x $p;