no message

This commit is contained in:
Chris Danford
2002-05-19 06:13:16 +00:00
parent 2f80235590
commit b8e01d8164
4 changed files with 215 additions and 157 deletions
+10 -3
View File
@@ -251,8 +251,11 @@ void splitrelpath( const CString &Path, CString& Dir, CString& FName, CString& E
}
void GetDirListing( CString sPath, CStringArray &AddTo, bool bOnlyDirs )
void GetDirListing( CString sPath, CStringArray &AddTo, bool bOnlyDirs, bool bReturnPathToo )
{
CString sDir, sThrowAway;
splitrelpath( sPath, sDir, sThrowAway, sThrowAway );
WIN32_FIND_DATA fd;
HANDLE hFind = ::FindFirstFile( sPath, &fd );
@@ -268,8 +271,12 @@ void GetDirListing( CString sPath, CStringArray &AddTo, bool bOnlyDirs )
if( sDirName == "." || sDirName == ".." )
continue;
AddTo.Add( sDirName );
if( bReturnPathToo )
AddTo.Add( sDir + sDirName );
else
AddTo.Add( sDirName );
} while( ::FindNextFile( hFind, &fd ) );
::FindClose( hFind );