|
|
@ -360,7 +360,11 @@ namespace mrw { |
|
|
|
operator bool() throw() { |
|
|
|
operator bool() throw() { |
|
|
|
static const std::string D("."), DD(".."); |
|
|
|
static const std::string D("."), DD(".."); |
|
|
|
static dirent* fake; |
|
|
|
static dirent* fake; |
|
|
|
if (readdir_r(_dir, &_entry.entry(), &fake) || !fake) return false; |
|
|
|
# if defined(WIN32) || defined(_WIN32) || defined(__MINGW32__) |
|
|
|
|
|
|
|
if (!(_entry.entry()=readdir(_dir))) return false; |
|
|
|
|
|
|
|
# else |
|
|
|
|
|
|
|
if (readdir_r(_dir, &_entry.entry(), &fake) || !fake) return false; |
|
|
|
|
|
|
|
# endif |
|
|
|
if (_ignoreDots |
|
|
|
if (_ignoreDots |
|
|
|
&& (_entry.type()==Entry::UNKNOWN || _entry.type()==Entry::DIR) |
|
|
|
&& (_entry.type()==Entry::UNKNOWN || _entry.type()==Entry::DIR) |
|
|
|
&& (D==_entry() || DD==_entry())) |
|
|
|
&& (D==_entry() || DD==_entry())) |
|
|
|