mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-23 19:23:23 +01:00
Do not mark directories as `executable', we only want program files
Patch by Markus Oberhumer. llvm-svn: 21377
This commit is contained in:
parent
7f8c9b4840
commit
11854af05f
@ -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 );
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user