From 2f4211249e0b3863d6058252ed55dc0e4f9d6c7f Mon Sep 17 00:00:00 2001 From: Susko3 Date: Mon, 5 Feb 2024 13:12:03 +0100 Subject: [PATCH] Use cleaner way to specify .exe path --- osu.Desktop/OsuGameDesktop.cs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/osu.Desktop/OsuGameDesktop.cs b/osu.Desktop/OsuGameDesktop.cs index c5175fd549..a6d9ff1653 100644 --- a/osu.Desktop/OsuGameDesktop.cs +++ b/osu.Desktop/OsuGameDesktop.cs @@ -138,10 +138,7 @@ namespace osu.Desktop LoadComponentAsync(new GameplayWinKeyBlocker(), Add); if (OperatingSystem.IsWindows() && IsDeployedBuild) - { - string? executableLocation = Path.GetDirectoryName(typeof(OsuGameDesktop).Assembly.Location); - LoadComponentAsync(new WindowsAssociationManager(Path.Join(executableLocation, @"osu!.exe"), "osu"), Add); - } + LoadComponentAsync(new WindowsAssociationManager(Path.ChangeExtension(typeof(OsuGameDesktop).Assembly.Location, ".exe"), "osu"), Add); LoadComponentAsync(new ElevatedPrivilegesChecker(), Add);