[wx-dev] [ wxwindows-Bugs-1566309 ] wxDir::IsOpened() and wxDir::Open() always true

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@53592 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robert Roebling
2008-05-14 09:27:48 +00:00
parent 8415332b59
commit 8943292322

View File

@@ -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