mirror of
https://github.com/ppy/osu
synced 2025-02-04 20:32:12 +00:00
Return null
intead of FileNotFoundException
on missing file in ZipArchiveReader
This commit is contained in:
parent
1fd4a6dc96
commit
d39ef48b71
@ -31,7 +31,7 @@ namespace osu.Game.IO.Archives
|
|||||||
{
|
{
|
||||||
ZipArchiveEntry entry = archive.Entries.SingleOrDefault(e => e.Key == name);
|
ZipArchiveEntry entry = archive.Entries.SingleOrDefault(e => e.Key == name);
|
||||||
if (entry == null)
|
if (entry == null)
|
||||||
throw new FileNotFoundException();
|
return null;
|
||||||
|
|
||||||
var owner = MemoryAllocator.Default.Allocate<byte>((int)entry.Size);
|
var owner = MemoryAllocator.Default.Allocate<byte>((int)entry.Size);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user