From e1a3269cea261987dd0eb209a9a6c0100a66aa0e Mon Sep 17 00:00:00 2001 From: Kelvin Sherlock Date: Sun, 12 May 2013 22:14:22 -0400 Subject: [PATCH] ignore directories --- bin/loader.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)