mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 09:27:29 +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)
|
||||
{
|
||||
// Path used primarily in tests (converting `ManifestResourceStream`s to `MemoryStream`s).
|
||||
memoryStream = new MemoryStream(Stream.ReadAllBytesToArray());
|
||||
Stream.Dispose();
|
||||
}
|
||||
|
||||
if (ZipUtils.IsZipArchive(memoryStream))
|
||||
return new ZipArchiveReader(memoryStream, Path);
|
||||
|
Loading…
Reference in New Issue
Block a user