X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/a236aa2058ccf3d36e9cafc20fa7375080c4be50..575cabba69600557a34a08ddefad66628296ffad:/src/msw/dir.cpp?ds=sidebyside diff --git a/src/msw/dir.cpp b/src/msw/dir.cpp index 5525d72a61..1bdeb321f7 100644 --- a/src/msw/dir.cpp +++ b/src/msw/dir.cpp @@ -303,9 +303,20 @@ wxDir::wxDir(const wxString& dirname) bool wxDir::Open(const wxString& dirname) { delete M_DIR; - m_data = new wxDirData(dirname); + + // The Unix code does a similar test + if (wxDirExists(dirname)) + { + m_data = new wxDirData(dirname); - return true; + return true; + } + else + { + m_data = NULL; + + return false; + } } bool wxDir::IsOpened() const