1
0
mirror of synced 2024-12-01 02:27:22 +01:00

Dispose reader streams for file tables once finsihed

This commit is contained in:
KillzXGaming 2019-06-12 17:40:15 -04:00
parent ef1550facc
commit 376657825c
5 changed files with 11 additions and 2 deletions

Binary file not shown.

View File

@ -95,6 +95,9 @@ namespace Switch_Toolbox.Library
NameTables.Add(Name, Size); NameTables.Add(Name, Size);
} }
reader.Close();
reader.Dispose();
} }
public void Write(FileWriter writer) public void Write(FileWriter writer)

View File

@ -47,6 +47,9 @@ namespace Switch_Toolbox.Library
uint.TryParse(Size, out sizeNum); uint.TryParse(Size, out sizeNum);
FileSizes.Add(FileName, sizeNum); FileSizes.Add(FileName, sizeNum);
} }
reader.Close();
reader.Dispose();
} }
public void ReadDecompressedTable(FileReader reader) public void ReadDecompressedTable(FileReader reader)
@ -72,6 +75,9 @@ namespace Switch_Toolbox.Library
DecompressedFileSizes.Add(entry.FilePath, entry); DecompressedFileSizes.Add(entry.FilePath, entry);
} }
reader.Close();
reader.Dispose();
} }
public void WriteCompressedTable(FileWriter writer) public void WriteCompressedTable(FileWriter writer)

View File

@ -162,8 +162,8 @@ namespace Switch_Toolbox.Library.IO
} }
}*/ }*/
CompressedFileTbl.WriteCompressedTable(new FileWriter($"{Runtime.TpGamePath}/FileSizeList.txt")); CompressedFileTbl.WriteCompressedTable(new FileWriter($"{Runtime.TpGamePath}/FileSizeListTEST.txt"));
DecompressedFileTbl.WriteDecompressedTable(new FileWriter($"{Runtime.TpGamePath}/DecompressedSizeList.txt")); DecompressedFileTbl.WriteDecompressedTable(new FileWriter($"{Runtime.TpGamePath}/DecompressedSizeListTEST.txt"));
} }
return FileLog; return FileLog;