mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 10:52:53 +08:00
Bring back disposal of stream after copy-out to MemoryStream
Was there in previous code and got removed in the refactor. I'd rather have it than not.
This commit is contained in:
parent
57f32b177d
commit
c8b18acd4d
@ -59,8 +59,11 @@ namespace osu.Game.Database
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (Stream is not MemoryStream memoryStream)
|
if (Stream is not MemoryStream memoryStream)
|
||||||
|
{
|
||||||
// Path used primarily in tests (converting `ManifestResourceStream`s to `MemoryStream`s).
|
// Path used primarily in tests (converting `ManifestResourceStream`s to `MemoryStream`s).
|
||||||
memoryStream = new MemoryStream(Stream.ReadAllBytesToArray());
|
memoryStream = new MemoryStream(Stream.ReadAllBytesToArray());
|
||||||
|
Stream.Dispose();
|
||||||
|
}
|
||||||
|
|
||||||
if (ZipUtils.IsZipArchive(memoryStream))
|
if (ZipUtils.IsZipArchive(memoryStream))
|
||||||
return new ZipArchiveReader(memoryStream, Path);
|
return new ZipArchiveReader(memoryStream, Path);
|
||||||
|
Loading…
Reference in New Issue
Block a user