1
0
mirror of https://github.com/ppy/osu.git synced 2026-05-13 20:33:35 +08:00

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?
This commit is contained in:
Joseph Madamba
2026-03-29 08:00:17 -07:00
committed by GitHub
Unverified
parent 11a78554fe
commit 940848e3e1
2 changed files with 5 additions and 12 deletions
@@ -40,14 +40,9 @@ namespace osu.Game.Localisation
public static LocalisableString SelectNewLocation => new TranslatableString(getKey(@"select_new_location"), @"Please select a new location");
/// <summary>
/// "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."
/// </summary>
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?");
/// <summary>
/// "To complete this operation, osu! will close. Please open it again to use the new data location."
/// </summary>
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.");
/// <summary>
/// "Delete ALL beatmaps"
@@ -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();
},
() => { }));