*** empty log message ***

This commit is contained in:
David Rose 2000-11-11 04:41:50 +00:00
parent 768fdab67a
commit f8c69b1072

View File

@ -592,21 +592,21 @@ bool Filename::
is_regular_file() const { is_regular_file() const {
#ifdef WIN32_VC #ifdef WIN32_VC
struct _stat this_buf; struct _stat this_buf;
bool isdir = false; bool isreg = false;
if (_stat(to_os_specific().c_str(), &this_buf) == 0) { if (_stat(to_os_specific().c_str(), &this_buf) == 0) {
isdir = S_ISREG(this_buf.st_mode); isreg = (this_buf.st_mode & _S_IFREG) != 0;
} }
#else // WIN32_VC #else // WIN32_VC
struct stat this_buf; struct stat this_buf;
bool isdir = false; bool isreg = false;
if (stat(to_os_specific().c_str(), &this_buf) == 0) { if (stat(to_os_specific().c_str(), &this_buf) == 0) {
isdir = S_ISREG(this_buf.st_mode); isreg = S_ISREG(this_buf.st_mode);
} }
#endif #endif
return isdir; return isreg;
} }
//////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////
@ -622,7 +622,7 @@ is_directory() const {
bool isdir = false; bool isdir = false;
if (_stat(to_os_specific().c_str(), &this_buf) == 0) { if (_stat(to_os_specific().c_str(), &this_buf) == 0) {
isdir = S_ISDIR(this_buf.st_mode); isdir = (this_buf.st_mode & _S_IFDIR) != 0;
} }
#else // WIN32_VC #else // WIN32_VC
struct stat this_buf; struct stat this_buf;