projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
baec07c
)
Do not mark directories as `executable', we only want program files
author
Misha Brukman
<brukman+llvm@gmail.com>
Wed, 20 Apr 2005 15:33:22 +0000
(15:33 +0000)
committer
Misha Brukman
<brukman+llvm@gmail.com>
Wed, 20 Apr 2005 15:33:22 +0000
(15:33 +0000)
Patch by Markus Oberhumer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21377
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/System/Unix/Path.inc
patch
|
blob
|
history
diff --git
a/lib/System/Unix/Path.inc
b/lib/System/Unix/Path.inc
index e55d9edcf2c8ebeebc5e7f25dd3d94f0143d8128..ce0e49127e094d2e2c045466a27af827a9c1cc4b 100644
(file)
--- a/
lib/System/Unix/Path.inc
+++ b/
lib/System/Unix/Path.inc
@@
-311,6
+311,10
@@
Path::writable() const {
bool
Path::executable() const {
+ struct stat st;
+ int r = stat(path.c_str(), &st);
+ if (r != 0 || !S_ISREG(st.st_mode))
+ return false;
return 0 == access(path.c_str(), R_OK | X_OK );
}