From 940848e3e159c415a309bba79a6df841b474901f Mon Sep 17 00:00:00 2001 From: Joseph Madamba Date: Sun, 29 Mar 2026 08:00:17 -0700 Subject: [PATCH] Only show one dialog and automatically restart when changing folder to already installed location (#37137) - Closes https://github.com/ppy/osu/issues/37039 https://github.com/user-attachments/assets/eb788984-783c-42ac-a7db-e6daa64d609d Can't gracefully exit because main menu has another exit confirmation dialog. May need to revisit https://github.com/ppy/osu/pull/26558. Unless force exiting is intentional? --- osu.Game/Localisation/MaintenanceSettingsStrings.cs | 9 ++------- .../Sections/Maintenance/MigrationSelectScreen.cs | 8 +++----- 2 files changed, 5 insertions(+), 12 deletions(-) diff --git a/osu.Game/Localisation/MaintenanceSettingsStrings.cs b/osu.Game/Localisation/MaintenanceSettingsStrings.cs index 6d5e0d5e0e..daf27c6ea2 100644 --- a/osu.Game/Localisation/MaintenanceSettingsStrings.cs +++ b/osu.Game/Localisation/MaintenanceSettingsStrings.cs @@ -40,14 +40,9 @@ namespace osu.Game.Localisation public static LocalisableString SelectNewLocation => new TranslatableString(getKey(@"select_new_location"), @"Please select a new location"); /// - /// "The target directory already seems to have an osu! install. Use that data instead?" + /// "The target directory already seems to have an osu! install. Use that data instead? osu! will restart." /// - public static LocalisableString TargetDirectoryAlreadyInstalledOsu => new TranslatableString(getKey(@"target_directory_already_installed_osu"), @"The target directory already seems to have an osu! install. Use that data instead?"); - - /// - /// "To complete this operation, osu! will close. Please open it again to use the new data location." - /// - public static LocalisableString RestartAndReOpenRequiredForCompletion => new TranslatableString(getKey(@"restart_and_re_open_required_for_completion"), @"To complete this operation, osu! will close. Please open it again to use the new data location."); + public static LocalisableString TargetDirectoryAlreadyInstalledOsu => new TranslatableString(getKey(@"target_directory_already_installed_osu"), @"The target directory already seems to have an osu! install. Use that data instead? osu! will restart."); /// /// "Delete ALL beatmaps" diff --git a/osu.Game/Overlays/Settings/Sections/Maintenance/MigrationSelectScreen.cs b/osu.Game/Overlays/Settings/Sections/Maintenance/MigrationSelectScreen.cs index 309e2a1401..3a3156f1eb 100644 --- a/osu.Game/Overlays/Settings/Sections/Maintenance/MigrationSelectScreen.cs +++ b/osu.Game/Overlays/Settings/Sections/Maintenance/MigrationSelectScreen.cs @@ -54,11 +54,9 @@ namespace osu.Game.Overlays.Settings.Sections.Maintenance { dialogOverlay.Push(new ConfirmDialog(MaintenanceSettingsStrings.TargetDirectoryAlreadyInstalledOsu, () => { - dialogOverlay.Push(new ConfirmDialog(MaintenanceSettingsStrings.RestartAndReOpenRequiredForCompletion, () => - { - (storage as OsuStorage)?.ChangeDataPath(target.FullName); - game.Exit(); - }, () => { })); + (storage as OsuStorage)?.ChangeDataPath(target.FullName); + game.RestartAppWhenExited(); + game.Exit(); }, () => { }));