1
0
mirror of synced 2025-02-26 06:49:45 +01:00

Try to fix the file loader disposing streams

This commit is contained in:
KillzXGaming 2019-07-25 14:31:33 -04:00
parent d5b084e4e4
commit 40c0fcae11

View File

@ -178,7 +178,7 @@ namespace Toolbox.Library.IO
{
if (compressionFormat.Identify(stream))
{
compressionFormat.Decompress(stream);
stream = compressionFormat.Decompress(stream);
}
}
@ -349,10 +349,7 @@ namespace Toolbox.Library.IO
if (Compressed)
fileFormat.IFileInfo.CompressionType = CompType;
fileFormat.Load(stream);
if (fileFormat is TreeNode)
{
if (archiveNode != null)
@ -366,8 +363,8 @@ namespace Toolbox.Library.IO
if (!LeaveStreamOpen)
{
stream.Close();
stream.Dispose();
GC.SuppressFinalize(stream);
}
return fileFormat;