From 8032d3d46aa5bb050f02eaa49ef1cea612e42396 Mon Sep 17 00:00:00 2001 From: Alex Barney Date: Wed, 22 Aug 2018 09:57:47 -0500 Subject: [PATCH] Workaround save files containing duplicate filenames --- libhac/Savefile/Savefile.cs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/libhac/Savefile/Savefile.cs b/libhac/Savefile/Savefile.cs index 27e61249..c92069bb 100644 --- a/libhac/Savefile/Savefile.cs +++ b/libhac/Savefile/Savefile.cs @@ -93,7 +93,13 @@ namespace libhac.Savefile layout.JournalDataSizeB + layout.SizeReservedArea); JournalStream = new JournalStream(journalData, journalMap, (int)Header.Journal.BlockSize); ReadFileInfo(); - FileDict = Files.ToDictionary(x => x.FullPath, x => x); + Dictionary dictionary = new Dictionary(); + foreach (FileEntry entry in Files) + { + dictionary[entry.FullPath] = entry; + } + + FileDict = dictionary; } }