X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/6dc863c78f4a4949579efa184d847f0fe41095c8..23176131010f41b2f9a54bef50c8afa25472e195:/src/mac/carbon/dirmac.cpp diff --git a/src/mac/carbon/dirmac.cpp b/src/mac/carbon/dirmac.cpp index 0afc3b5cb3..ff168bafdc 100644 --- a/src/mac/carbon/dirmac.cpp +++ b/src/mac/carbon/dirmac.cpp @@ -81,7 +81,6 @@ public: void Rewind() ; const wxString& GetName() const { return m_dirname; } - bool Ok() const { return m_ok; } private: CInfoPBRec m_CPB ; @@ -94,7 +93,6 @@ private: wxString m_filespec; int m_flags; - bool m_ok; }; // ============================================================================ @@ -108,8 +106,6 @@ private: wxDirData::wxDirData(const wxString& dirname) : m_dirname(dirname) { - m_ok = false; - OSErr err; // throw away the trailing slashes @@ -137,11 +133,7 @@ wxDirData::wxDirData(const wxString& dirname) err = FSpGetDirectoryID( &fsspec , &m_dirId , &m_isDir ) ; #endif - //wxASSERT_MSG( (err == noErr) || (err == nsvErr) , wxT("Error accessing directory " + m_dirname)) ; - if ( (err == noErr) || (err == nsvErr)) - m_ok = true; - else - wxLogError(wxString(wxT("Error accessing directory ")) + m_dirname); + wxASSERT_MSG( (err == noErr) || (err == nsvErr) , wxT("Error accessing directory " + m_dirname)) ; m_CPB.hFileInfo.ioNamePtr = m_name ; m_index = 0 ; @@ -255,14 +247,8 @@ bool wxDir::Open(const wxString& dirname) { delete M_DIR; m_data = new wxDirData(dirname); - if (m_data->Ok()) - return TRUE; - else - { - delete m_data; - m_data = NULL; - return FALSE; - } + + return TRUE; } bool wxDir::IsOpened() const