Try to fix the file loader disposing streams
This commit is contained in:
parent
d5b084e4e4
commit
40c0fcae11
@ -178,7 +178,7 @@ namespace Toolbox.Library.IO
|
|||||||
{
|
{
|
||||||
if (compressionFormat.Identify(stream))
|
if (compressionFormat.Identify(stream))
|
||||||
{
|
{
|
||||||
compressionFormat.Decompress(stream);
|
stream = compressionFormat.Decompress(stream);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -349,10 +349,7 @@ namespace Toolbox.Library.IO
|
|||||||
if (Compressed)
|
if (Compressed)
|
||||||
fileFormat.IFileInfo.CompressionType = CompType;
|
fileFormat.IFileInfo.CompressionType = CompType;
|
||||||
|
|
||||||
|
|
||||||
fileFormat.Load(stream);
|
fileFormat.Load(stream);
|
||||||
|
|
||||||
|
|
||||||
if (fileFormat is TreeNode)
|
if (fileFormat is TreeNode)
|
||||||
{
|
{
|
||||||
if (archiveNode != null)
|
if (archiveNode != null)
|
||||||
@ -366,8 +363,8 @@ namespace Toolbox.Library.IO
|
|||||||
|
|
||||||
if (!LeaveStreamOpen)
|
if (!LeaveStreamOpen)
|
||||||
{
|
{
|
||||||
stream.Close();
|
|
||||||
stream.Dispose();
|
stream.Dispose();
|
||||||
|
GC.SuppressFinalize(stream);
|
||||||
}
|
}
|
||||||
|
|
||||||
return fileFormat;
|
return fileFormat;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user