mirror of
https://github.com/ppy/osu
synced 2024-12-13 18:37:04 +00:00
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.
This commit is contained in:
parent
b88461b3c9
commit
336df62a1f
@ -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()));
|
||||
|
Loading…
Reference in New Issue
Block a user