committed ziberpunk's patch...

...to make detecting if something is a directory use stat on
non-Windows systems
This commit is contained in:
Dave White 2003-12-03 17:27:43 +00:00
parent a03bea0350
commit 04fef03108

View file

@ -239,13 +239,9 @@ bool is_directory_internal(const std::string& fname)
}
#else
DIR* const dir = opendir(fname.c_str());
if(dir != NULL) {
closedir(dir);
return true;
} else {
return false;
}
struct stat dir_stat;
::stat(fname.c_str(), &dir_stat);
return S_ISDIR(dir_stat.st_mode);
#endif
}