diff --git a/osu.Game/Database/LegacyArchiveExporter.cs b/osu.Game/Database/LegacyArchiveExporter.cs index 01d00b311d..f148d6951d 100644 --- a/osu.Game/Database/LegacyArchiveExporter.cs +++ b/osu.Game/Database/LegacyArchiveExporter.cs @@ -54,20 +54,14 @@ namespace osu.Game.Database using (var stream = UserFileStorage.GetStream(file.File.GetStoragePath())) { - // Sometimes we cannot find the file(probably deleted by the user), so we handle this and post a error. if (stream == null) { - // Only pop up once to prevent spam. - if (!fileMissing) - { - Logger.Log("Some of model files are missing, they will not be included in the archive", LoggingTarget.Database, LogLevel.Error); - fileMissing = true; - } - } - else - { - writer.Write(file.Filename, stream); + Logger.Log($"File {file.Filename} is missing in local storage and will not be included in the export", LoggingTarget.Database); + fileMissing = true; + continue; } + + writer.Write(file.Filename, stream); } if (notification != null) @@ -77,6 +71,12 @@ namespace osu.Game.Database i++; } + + // Only pop up once to prevent spam. + if (fileMissing) + { + Logger.Log("Some of model files are missing, they will not be included in the archive", LoggingTarget.Database, LogLevel.Error); + } } catch (ObjectDisposedException) {