diff --git a/src/mrw/file.hxx b/src/mrw/file.hxx index 97c3866..e1ed102 100644 --- a/src/mrw/file.hxx +++ b/src/mrw/file.hxx @@ -360,7 +360,11 @@ namespace mrw { operator bool() throw() { static const std::string D("."), DD(".."); 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 && (_entry.type()==Entry::UNKNOWN || _entry.type()==Entry::DIR) && (D==_entry() || DD==_entry()))