#include <windows.h>
#endif
+#include "wx/mac/private.h"
+
#include "MoreFiles.h"
#include "MoreFilesExtras.h"
m_CPB.hFileInfo.ioNamePtr = m_name ;
m_index = 0 ;
- FSpGetDirectoryID( &fsspec , &m_dirId , &m_isDir ) ;
+ OSErr err = FSpGetDirectoryID( &fsspec , &m_dirId , &m_isDir ) ;
+ wxASSERT_MSG( err == noErr , "Error accessing directory") ;
}
wxDirData::~wxDirData()
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 ;
continue ;
wxString file( m_name ) ;
- if ( m_filespec.IsEmpty() || m_filespec == "*.*" )
+ if ( m_filespec.IsEmpty() || m_filespec == "*.*" || m_filespec == "*" )
{
}
else if ( m_filespec.Length() > 1 && m_filespec.Left(1) =="*" )
wxDir::~wxDir()
{
- delete M_DIR;
+ if (M_DIR != NULL) {
+ delete M_DIR;
+ m_data = NULL;
+ }
}
// ----------------------------------------------------------------------------