X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/76a5e5d21ee1a6230d777ce0209b2df4c6075f0f..4dcf0afed72e5364cbd82dcc9b75f0e841151e76:/src/mac/dirmac.cpp diff --git a/src/mac/dirmac.cpp b/src/mac/dirmac.cpp index 1acff5b7ca..129f61a754 100644 --- a/src/mac/dirmac.cpp +++ b/src/mac/dirmac.cpp @@ -118,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() @@ -156,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 ; @@ -253,7 +258,10 @@ wxString wxDir::GetName() const wxDir::~wxDir() { - delete M_DIR; + if (M_DIR != NULL) { + delete M_DIR; + m_data = NULL; + } } // ----------------------------------------------------------------------------