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);
}
reader.Close();
reader.Dispose();
}
public void Write(FileWriter writer)

View file

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

View file

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