Skip to content

Commit

Permalink
Fix assembly location lookups
Browse files Browse the repository at this point in the history
  • Loading branch information
peppy committed Dec 16, 2022
1 parent de079e0 commit dd9a418
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion osu.Game/Tests/Beatmaps/BeatmapConversionTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ public IBeatmap GetBeatmap(string name)

private Stream openResource(string name)
{
string localPath = Path.GetDirectoryName(Uri.UnescapeDataString(new UriBuilder(Assembly.GetExecutingAssembly().Location).Path)).AsNonNull();
string localPath = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location).AsNonNull();
return Assembly.LoadFrom(Path.Combine(localPath, $"{ResourceAssembly}.dll")).GetManifestResourceStream($@"{ResourceAssembly}.Resources.{name}");
}

Expand Down
3 changes: 1 addition & 2 deletions osu.Game/Tests/Beatmaps/DifficultyCalculatorTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

#nullable disable

using System;
using System.IO;
using System.Reflection;
using NUnit.Framework;
Expand Down Expand Up @@ -54,7 +53,7 @@ private IWorkingBeatmap getBeatmap(string name)

private Stream openResource(string name)
{
string localPath = Path.GetDirectoryName(Uri.UnescapeDataString(new UriBuilder(Assembly.GetExecutingAssembly().Location).Path)).AsNonNull();
string localPath = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location).AsNonNull();
return Assembly.LoadFrom(Path.Combine(localPath, $"{ResourceAssembly}.dll")).GetManifestResourceStream($@"{ResourceAssembly}.Resources.{name}");
}

Expand Down

0 comments on commit dd9a418

Please sign in to comment.