X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/1c66f293b6d7c7ef99cf8f8fc7b391d694e169f0..4dcf0afed72e5364cbd82dcc9b75f0e841151e76:/src/mac/carbon/dirmac.cpp diff --git a/src/mac/carbon/dirmac.cpp b/src/mac/carbon/dirmac.cpp index c1b010f5f7..129f61a754 100644 --- a/src/mac/carbon/dirmac.cpp +++ b/src/mac/carbon/dirmac.cpp @@ -40,6 +40,8 @@ #include #endif +#include "wx/mac/private.h" + #include "MoreFiles.h" #include "MoreFilesExtras.h" @@ -116,7 +118,7 @@ wxDirData::wxDirData(const wxString& dirname) m_CPB.hFileInfo.ioNamePtr = m_name ; m_index = 0 ; - FSpGetDirectoryID( &fsspec , &m_dirId , &m_isDir ) ; + OSErr err = FSpGetDirectoryID( &fsspec , &m_dirId , &m_isDir ) ; } wxDirData::~wxDirData() @@ -154,6 +156,11 @@ bool wxDirData::Read(wxString *filename) strcpy( (char *)m_name, c_name); #else p2cstr( m_name ) ; +#endif +#if TARGET_CARBON + // under X thats the way the mounting points look like + if ( ( m_CPB.dirInfo.ioDrDirID == 0 ) && ( m_flags & wxDIR_DIRS) ) + break ; #endif if ( ( m_CPB.dirInfo.ioFlAttrib & ioDirMask) != 0 && (m_flags & wxDIR_DIRS) ) // we have a directory break ; @@ -251,7 +258,10 @@ wxString wxDir::GetName() const wxDir::~wxDir() { - delete M_DIR; + if (M_DIR != NULL) { + delete M_DIR; + m_data = NULL; + } } // ----------------------------------------------------------------------------