diff --git a/bin/loader.cpp b/bin/loader.cpp index b7ea0c5..c39e8fe 100644 --- a/bin/loader.cpp +++ b/bin/loader.cpp @@ -661,7 +661,7 @@ bool file_exists(const std::string & name) { struct stat st; - return ::stat(name.c_str(), &st) == 0; + return ::stat(name.c_str(), &st) == 0 && S_ISREG(st.st_mode); } std::string find_exe(const std::string &name)