1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-15 10:42:54 +08:00

Actually use mapName whoops

This commit is contained in:
MillhioreF 2017-08-10 01:49:34 -05:00
parent f819ffce2b
commit 2e5a7374a8

View File

@ -307,10 +307,11 @@ namespace osu.Game.Beatmaps
/// <returns>The imported beatmap, or an existing instance if it is already present.</returns>
private BeatmapSetInfo importToStorage(ArchiveReader reader)
{
string mapName;
// let's make sure there are actually .osu files to import.
try
{
string mapName = reader.Filenames.First(f => f.EndsWith(".osu"));
mapName = reader.Filenames.First(f => f.EndsWith(".osu"));
}
catch
{
@ -349,7 +350,7 @@ namespace osu.Game.Beatmaps
BeatmapMetadata metadata;
using (var stream = new StreamReader(reader.GetStream(reader.Filenames.First(f => f.EndsWith(".osu")))))
using (var stream = new StreamReader(reader.GetStream(mapName)))
metadata = BeatmapDecoder.GetDecoder(stream).Decode(stream).Metadata;
beatmapSet = new BeatmapSetInfo