diff options
author | Dan Gohman <gohman@apple.com> | 2009-07-28 23:25:18 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2009-07-28 23:25:18 +0000 |
commit | a87861e4f88a40705e99c92ce3f01e4c365945de (patch) | |
tree | bb3ec320f3d8902ea56f75b54d5bf646897a50d7 /lib/System/Unix/Program.inc | |
parent | fd29440c07f195d7c059efeb50fe0c5905d88b3b (diff) |
On "Unix", if Program::FindProgramByName is given a name containing
slashes, just go with it, regardless of whether it looks like it will
be executable. This follows the behavior of sh(1) more closely.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77396 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/System/Unix/Program.inc')
-rw-r--r-- | lib/System/Unix/Program.inc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/System/Unix/Program.inc b/lib/System/Unix/Program.inc index 7e82ef3f93..3c5a54cffc 100644 --- a/lib/System/Unix/Program.inc +++ b/lib/System/Unix/Program.inc @@ -47,7 +47,7 @@ Program::FindProgramByName(const std::string& progName) { return Path(); // Use the given path verbatim if it contains any slashes; this matches // the behavior of sh(1) and friends. - if (progName.find('/') != std::string::npos && temp.canExecute()) + if (progName.find('/') != std::string::npos) return temp; // At this point, the file name is valid and its not executable |