Log all files when no beatmap files in archive error occurs

This commit is contained in:
smoogipoo 2018-08-23 10:56:52 +09:00
parent 601ae43e87
commit 8f261988f7
1 changed files with 5 additions and 1 deletions

View File

@ -351,7 +351,11 @@ protected override BeatmapSetInfo CreateModel(ArchiveReader reader)
// let's make sure there are actually .osu files to import.
string mapName = reader.Filenames.FirstOrDefault(f => f.EndsWith(".osu"));
if (string.IsNullOrEmpty(mapName))
throw new InvalidOperationException($"No beatmap files found in this beatmap archive ({reader.Name}).");
{
// Todo: This is temporary for debugging purposes
var files = reader.Filenames.ToList();
throw new InvalidOperationException($"No beatmap files found in this beatmap archive. Files ({files.Count}): {string.Join(", ", files)}");
}
Beatmap beatmap;
using (var stream = new StreamReader(reader.GetStream(mapName)))