X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/da865fdd325f7833246eecd665849b14f43e19d7..69373110a5708901801ebf2c7d2d4ee76754e866:/src/mac/carbon/dirmac.cpp diff --git a/src/mac/carbon/dirmac.cpp b/src/mac/carbon/dirmac.cpp index 7c3651fd63..8669577a49 100644 --- a/src/mac/carbon/dirmac.cpp +++ b/src/mac/carbon/dirmac.cpp @@ -17,10 +17,6 @@ // headers // ---------------------------------------------------------------------------- -#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) - #pragma implementation "dir.h" -#endif - // For compilers that support precompilation, includes "wx.h". #include "wx/wxprec.h" @@ -158,10 +154,13 @@ bool wxDirData::Read(wxString *filename) UInt32 fetched = 0; err = FSGetCatalogInfoBulk( m_iterator, 1, &fetched, NULL, kFSCatInfoNodeFlags | kFSCatInfoFinderInfo , &catalogInfo , &fileRef, NULL, &uniname ); + + // expected error codes + if ( errFSNoMoreItems == err ) return false ; - - wxASSERT( noErr == err ) ; + if ( afpAccessDenied == err ) + return false ; if ( noErr != err ) break ; @@ -243,12 +242,12 @@ wxString wxDir::GetName() const wxString name; if ( m_data ) { - name = M_DIR->GetName(); - if ( !name.empty() && (name.Last() == _T('/')) ) - { - // chop off the last (back)slash - name.Truncate(name.length() - 1); - } + name = M_DIR->GetName(); + if ( !name.empty() && (name.Last() == _T('/')) ) + { + // chop off the last (back)slash + name.Truncate(name.length() - 1); + } } return name;