ignore directories

This commit is contained in:
Kelvin Sherlock 2013-05-12 22:14:22 -04:00
parent 6d76fae173
commit e1a3269cea

View File

@ -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)