Skip to content

Commit

Permalink
FbTk/FileUtil.cc: Use only file masks defined.
Browse files Browse the repository at this point in the history
Needed for mingw-cross-env
  • Loading branch information
rpavlik committed Oct 31, 2011
1 parent 1ba4fbe commit 75c6cee
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/FbTk/FileUtil.cc
Expand Up @@ -63,9 +63,14 @@ bool FileUtil::isExecutable(const char* filename) {
if (!filename || stat(filename, &buf))
return false;

return buf.st_mode & S_IXUSR ||
buf.st_mode & S_IXGRP ||
buf.st_mode & S_IXOTH;
return buf.st_mode & S_IXUSR
#ifdef S_IXGRP
|| buf.st_mode & S_IXGRP
#endif
#ifdef S_IXOTH
|| buf.st_mode & S_IXOTH
#endif
;
}

bool FileUtil::copyFile(const char* from, const char* to) {
Expand Down

0 comments on commit 75c6cee

Please sign in to comment.