mirror of
https://github.com/panda3d/panda3d.git
synced 2025-09-29 08:15:18 -04:00
*** empty log message ***
This commit is contained in:
parent
768fdab67a
commit
f8c69b1072
@ -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;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user