diff --git a/osu.Game/Beatmaps/BeatmapManager.cs b/osu.Game/Beatmaps/BeatmapManager.cs index bbb6c975d0..61cd2f0a2b 100644 --- a/osu.Game/Beatmaps/BeatmapManager.cs +++ b/osu.Game/Beatmaps/BeatmapManager.cs @@ -307,6 +307,16 @@ namespace osu.Game.Beatmaps /// The imported beatmap, or an existing instance if it is already present. private BeatmapSetInfo importToStorage(ArchiveReader reader) { + // let's make sure there are actually .osu files to import. + try + { + string mapName = reader.Filenames.First(f => f.EndsWith(".osu")); + } + catch + { + throw new InvalidOperationException("No beatmap files found in the map folder."); + } + // for now, concatenate all .osu files in the set to create a unique hash. MemoryStream hashable = new MemoryStream(); foreach (string file in reader.Filenames.Where(f => f.EndsWith(".osu")))