From 7e6bd0e995fe8ec1f33b5cbfa510ad7cac69c04e Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Fri, 26 Feb 2021 17:30:59 +0900 Subject: [PATCH] Fix "failed to import" message showing when importing from a stable install with no beatmaps --- osu.Game/Database/ArchiveModelManager.cs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/osu.Game/Database/ArchiveModelManager.cs b/osu.Game/Database/ArchiveModelManager.cs index 03b8db2cb8..daaba9098e 100644 --- a/osu.Game/Database/ArchiveModelManager.cs +++ b/osu.Game/Database/ArchiveModelManager.cs @@ -141,6 +141,13 @@ public Task Import(params ImportTask[] tasks) protected async Task> Import(ProgressNotification notification, params ImportTask[] tasks) { + if (tasks.Length == 0) + { + notification.CompletionText = $"No {HumanisedModelName}s were found to import!"; + notification.State = ProgressNotificationState.Completed; + return Enumerable.Empty(); + } + notification.Progress = 0; notification.Text = $"{HumanisedModelName.Humanize(LetterCasing.Title)} import is initialising...";