mirror of
https://github.com/ppy/osu.git
synced 2025-03-11 15:27:20 +08:00
Remove "leftover files" notification when migration partly fails
People were deleting files they shouldn't, causing osu! to lose track of where the real user files are. For now let's just keep things simple and not let the users know that some files got left behind. Usually the files which are left behind are minimal and it should be fine to leave this up to the user. Closes https://github.com/ppy/osu/issues/29505.
This commit is contained in:
parent
df94c22a29
commit
b3be04aff1
@ -34,11 +34,6 @@ namespace osu.Game.Localisation
|
||||
/// </summary>
|
||||
public static LocalisableString ProhibitedInteractDuringMigration => new TranslatableString(getKey(@"prohibited_interact_during_migration"), @"Please avoid interacting with the game!");
|
||||
|
||||
/// <summary>
|
||||
/// "Some files couldn't be cleaned up during migration. Clicking this notification will open the folder so you can manually clean things up."
|
||||
/// </summary>
|
||||
public static LocalisableString FailedCleanupNotification => new TranslatableString(getKey(@"failed_cleanup_notification"), @"Some files couldn't be cleaned up during migration. Clicking this notification will open the folder so you can manually clean things up.");
|
||||
|
||||
/// <summary>
|
||||
/// "Please select a new location"
|
||||
/// </summary>
|
||||
|
@ -515,6 +515,12 @@ namespace osu.Game
|
||||
/// <returns>Whether a restart operation was queued.</returns>
|
||||
public virtual bool RestartAppWhenExited() => false;
|
||||
|
||||
/// <summary>
|
||||
/// Perform migration of user data to a specified path.
|
||||
/// </summary>
|
||||
/// <param name="path">The path to migrate to.</param>
|
||||
/// <returns>Whether migration succeeded to completion. If <c>false</c>, some files were left behind.</returns>
|
||||
/// <exception cref="TimeoutException"></exception>
|
||||
public bool Migrate(string path)
|
||||
{
|
||||
Logger.Log($@"Migrating osu! data from ""{Storage.GetFullPath(string.Empty)}"" to ""{path}""...");
|
||||
@ -542,10 +548,10 @@ namespace osu.Game
|
||||
if (!readyToRun.Wait(30000) || !success)
|
||||
throw new TimeoutException("Attempting to block for migration took too long.");
|
||||
|
||||
bool? cleanupSucceded = (Storage as OsuStorage)?.Migrate(Host.GetStorage(path));
|
||||
bool? cleanupSucceeded = (Storage as OsuStorage)?.Migrate(Host.GetStorage(path));
|
||||
|
||||
Logger.Log(@"Migration complete!");
|
||||
return cleanupSucceded != false;
|
||||
return cleanupSucceeded != false;
|
||||
}
|
||||
finally
|
||||
{
|
||||
|
@ -108,18 +108,6 @@ namespace osu.Game.Overlays.Settings.Sections.Maintenance
|
||||
{
|
||||
Logger.Error(task.Exception, $"Error during migration: {task.Exception?.Message}");
|
||||
}
|
||||
else if (!task.GetResultSafely())
|
||||
{
|
||||
notifications.Post(new SimpleNotification
|
||||
{
|
||||
Text = MaintenanceSettingsStrings.FailedCleanupNotification,
|
||||
Activated = () =>
|
||||
{
|
||||
originalStorage.PresentExternally();
|
||||
return true;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Schedule(this.Exit);
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user