Fix crash with legacy import from incomplete installs

This commit is contained in:
its5Q 2022-08-28 14:13:38 +10:00
parent cf6bb3b030
commit 0cc6a76c17
1 changed files with 4 additions and 0 deletions

View File

@ -20,6 +20,10 @@ public class LegacyBeatmapImporter : LegacyModelImporter<BeatmapSetInfo>
protected override IEnumerable<string> GetStableImportPaths(Storage storage)
{
// make sure the directory exists
if (!storage.ExistsDirectory(string.Empty))
yield break;
foreach (string directory in storage.GetDirectories(string.Empty))
{
var directoryStorage = storage.GetStorageForDirectory(directory);