mirror of
https://github.com/osukey/osukey.git
synced 2025-07-01 08:20:00 +09:00
Ignore possible path-related nulls
They're all in test code anyway, so any issue there will cause a test to fail.
This commit is contained in:
@ -9,6 +9,7 @@ using System.Reflection;
|
||||
using Newtonsoft.Json;
|
||||
using NUnit.Framework;
|
||||
using osu.Framework.Audio.Track;
|
||||
using osu.Framework.Extensions.ObjectExtensions;
|
||||
using osu.Framework.Graphics.Textures;
|
||||
using osu.Game.Beatmaps;
|
||||
using osu.Game.Beatmaps.Formats;
|
||||
@ -164,7 +165,7 @@ namespace osu.Game.Tests.Beatmaps
|
||||
|
||||
private Stream openResource(string name)
|
||||
{
|
||||
var localPath = Path.GetDirectoryName(Uri.UnescapeDataString(new UriBuilder(Assembly.GetExecutingAssembly().CodeBase).Path));
|
||||
var localPath = Path.GetDirectoryName(Uri.UnescapeDataString(new UriBuilder(Assembly.GetExecutingAssembly().CodeBase).Path)).AsNonNull();
|
||||
return Assembly.LoadFrom(Path.Combine(localPath, $"{ResourceAssembly}.dll")).GetManifestResourceStream($@"{ResourceAssembly}.Resources.{name}");
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user