1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-13 08:32:57 +08:00

Return null intead of FileNotFoundException on missing file in ZipArchiveReader

This commit is contained in:
Dean Herbert 2023-08-03 09:01:11 +09:00
parent 1fd4a6dc96
commit d39ef48b71

View File

@ -31,7 +31,7 @@ namespace osu.Game.IO.Archives
{
ZipArchiveEntry entry = archive.Entries.SingleOrDefault(e => e.Key == name);
if (entry == null)
throw new FileNotFoundException();
return null;
var owner = MemoryAllocator.Default.Allocate<byte>((int)entry.Size);