SwitchFs: Don't try to open directories as NCA files

This commit is contained in:
Alex Barney 2019-04-30 15:40:31 -05:00
parent cc9ca448f0
commit 7804a919d1

View file

@ -61,7 +61,10 @@ namespace LibHac
private void OpenAllNcas()
{
IEnumerable<DirectoryEntry> files = ContentFs.OpenDirectory("/", OpenDirectoryMode.All).EnumerateEntries("*.nca", SearchOptions.RecurseSubdirectories);
// Todo: give warning if directories named "*.nca" are found or manually fix the archive bit
IEnumerable<DirectoryEntry> files = ContentFs.OpenDirectory("/", OpenDirectoryMode.All)
.EnumerateEntries("*.nca", SearchOptions.RecurseSubdirectories)
.Where(x => x.Type == DirectoryEntryType.File);
foreach (DirectoryEntry fileEntry in files)
{