1
0
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:
Bartłomiej Dach 2023-09-14 19:36:33 +02:00
parent 57f32b177d
commit c8b18acd4d
No known key found for this signature in database

View File

@ -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);