From 336df62a1fb0c6d3556db8e348ebbb0f9233d97f Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Mon, 13 Jun 2022 18:57:29 +0900 Subject: [PATCH] Remove unnecessary file existence check This is not required due to `createFileInfos` always being run before we get to this point (I believe this was added after the initial code to check existence was added). This flow is covered in `BeatmapImportTests.TestImportThenReimportAfterMissingFiles`, which still passes with the change. While this check isn't doing any harm, as I'm going through the flow for import-skipping, less checks are appreciated. --- osu.Game/Stores/RealmArchiveModelImporter.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/osu.Game/Stores/RealmArchiveModelImporter.cs b/osu.Game/Stores/RealmArchiveModelImporter.cs index 6d1449a4b4..e7477cfffc 100644 --- a/osu.Game/Stores/RealmArchiveModelImporter.cs +++ b/osu.Game/Stores/RealmArchiveModelImporter.cs @@ -521,8 +521,7 @@ namespace osu.Game.Stores // for the best or worst, we copy and import files of a new import before checking whether // it is a duplicate. so to check if anything has changed, we can just compare all File IDs. getIDs(existing.Files).SequenceEqual(getIDs(import.Files)) && - getFilenames(existing.Files).SequenceEqual(getFilenames(import.Files)) && - checkAllFilesExist(existing); + getFilenames(existing.Files).SequenceEqual(getFilenames(import.Files)); private bool checkAllFilesExist(TModel model) => model.Files.All(f => Files.Storage.Exists(f.File.GetStoragePath()));