Merge pull request #789 from AdmiralCurtiss/memcard-filter-dont-load-root-files

FolderMemoryCard: Don't load files in the root dir when filtering.
This commit is contained in:
refractionpcsx2 2015-08-23 19:10:04 +01:00
commit 1800770c94
1 changed files with 5 additions and 0 deletions

View File

@ -316,6 +316,11 @@ bool FolderMemoryCard::AddFolder( MemoryCardFileEntry* const dirEntry, const wxS
bool isFile = wxFile::Exists( fileInfo.GetFullPath() ); bool isFile = wxFile::Exists( fileInfo.GetFullPath() );
if ( isFile ) { if ( isFile ) {
// don't load files in the root dir if we're filtering; no official software stores files there
if ( enableFiltering && parent == nullptr ) {
hasNext = dir.GetNext( &fileName );
continue;
}
if ( AddFile( dirEntry, dirPath, fileName, parent ) ) { if ( AddFile( dirEntry, dirPath, fileName, parent ) ) {
++entryNumber; ++entryNumber;
} }