diff --git a/osu.Desktop/Program.cs b/osu.Desktop/Program.cs index db40f31c6f..b789c31777 100644 --- a/osu.Desktop/Program.cs +++ b/osu.Desktop/Program.cs @@ -26,14 +26,16 @@ public static class Program public static int Main(string[] args) { LegacyFilesystemReader.Register(); - - var cwd = Directory.GetCurrentDirectory(); + + // Back up the cwd before DesktopGameHost changes it + var cwd = Environment.CurrentDirectory; using (DesktopGameHost host = Host.GetSuitableHost(@"osu", true)) { if (!host.IsPrimaryInstance) { var importer = new BeatmapImporter(host); + // Restore the cwd so relative paths given at the command line work correctly Directory.SetCurrentDirectory(cwd); foreach (var file in args) {