correct isExecutable
This commit is contained in:
parent
1910d5af46
commit
ddfb14a264
1 changed files with 1 additions and 1 deletions
|
@ -62,7 +62,7 @@ bool FileUtil::isRegularFile(const char* filename) {
|
||||||
|
|
||||||
bool FileUtil::isExecutable(const char* filename) {
|
bool FileUtil::isExecutable(const char* filename) {
|
||||||
struct stat buf;
|
struct stat buf;
|
||||||
if (!filename || !stat(filename, &buf))
|
if (!filename || stat(filename, &buf))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
return buf.st_mode & S_IXUSR ||
|
return buf.st_mode & S_IXUSR ||
|
||||||
|
|
Loading…
Reference in a new issue