From cca7633e590700a483d71ed27a3bd3debfb4891d Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Wed, 15 Jun 2022 15:05:51 +0900 Subject: [PATCH] Rename variables and remove unnecessary nested call to `GetFullPath` --- osu.Game/Database/LegacyBeatmapImporter.cs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/osu.Game/Database/LegacyBeatmapImporter.cs b/osu.Game/Database/LegacyBeatmapImporter.cs index 9ce267086d..3477312154 100644 --- a/osu.Game/Database/LegacyBeatmapImporter.cs +++ b/osu.Game/Database/LegacyBeatmapImporter.cs @@ -18,19 +18,19 @@ namespace osu.Game.Database protected override IEnumerable GetStableImportPaths(Storage storage) { - foreach (string beatmapDirectory in storage.GetDirectories(string.Empty)) + foreach (string directory in storage.GetDirectories(string.Empty)) { - var beatmapStorage = storage.GetStorageForDirectory(beatmapDirectory); + var directoryStorage = storage.GetStorageForDirectory(directory); - if (!beatmapStorage.GetFiles(string.Empty).ExcludeSystemFileNames().Any()) + if (!directoryStorage.GetFiles(string.Empty).ExcludeSystemFileNames().Any()) { // if a directory doesn't contain files, attempt looking for beatmaps inside of that directory. // this is a special behaviour in stable for beatmaps only, see https://github.com/ppy/osu/issues/18615. - foreach (string beatmapInDirectory in GetStableImportPaths(beatmapStorage)) - yield return beatmapStorage.GetFullPath(beatmapInDirectory); + foreach (string subDirectory in GetStableImportPaths(directoryStorage)) + yield return subDirectory; } else - yield return storage.GetFullPath(beatmapDirectory); + yield return storage.GetFullPath(directory); } }