From 78a7d145c6160f66f598ba519e0ba5979f322849 Mon Sep 17 00:00:00 2001 From: Stefan Csomor Date: Fri, 17 Oct 2008 19:13:33 +0000 Subject: [PATCH] adding alias support for directories git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@56405 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/mac/carbon/dirmac.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/mac/carbon/dirmac.cpp b/src/mac/carbon/dirmac.cpp index 52e9a61e0f..86b6de6b25 100644 --- a/src/mac/carbon/dirmac.cpp +++ b/src/mac/carbon/dirmac.cpp @@ -115,6 +115,8 @@ bool wxDirData::Read(wxString *filename) err = wxMacPathToFSRef( m_dirname , &dirRef ) ; if ( err == noErr ) { + Boolean isFolder, wasAliased; + FSResolveAliasFile( &dirRef, TRUE, &isFolder, &wasAliased ); err = FSOpenIterator(&dirRef, kFSIterateFlat, &m_iterator); } if ( err ) @@ -155,6 +157,13 @@ bool wxDirData::Read(wxString *filename) if ( ( name[0U] == '.' ) && !(m_flags & wxDIR_HIDDEN ) ) continue ; + Boolean isFolder, wasAliased; + FSResolveAliasFile( &fileRef, TRUE, &isFolder, &wasAliased ); + if ( wasAliased ) + { + FSGetCatalogInfo( &fileRef, kFSCatInfoNodeFlags | kFSCatInfoFinderInfo, &catalogInfo, NULL, NULL, NULL ); + } + if ( (((FileInfo*)&catalogInfo.finderInfo)->finderFlags & kIsInvisible ) && !(m_flags & wxDIR_HIDDEN ) ) continue ;