From 7804a919d1971cc90d1ee6aeae7389defff47e24 Mon Sep 17 00:00:00 2001 From: Alex Barney Date: Tue, 30 Apr 2019 15:40:31 -0500 Subject: [PATCH] SwitchFs: Don't try to open directories as NCA files --- src/LibHac/SwitchFs.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/LibHac/SwitchFs.cs b/src/LibHac/SwitchFs.cs index b949fe3f..e814e997 100644 --- a/src/LibHac/SwitchFs.cs +++ b/src/LibHac/SwitchFs.cs @@ -61,7 +61,10 @@ namespace LibHac private void OpenAllNcas() { - IEnumerable 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 files = ContentFs.OpenDirectory("/", OpenDirectoryMode.All) + .EnumerateEntries("*.nca", SearchOptions.RecurseSubdirectories) + .Where(x => x.Type == DirectoryEntryType.File); foreach (DirectoryEntry fileEntry in files) {