mirror of
https://github.com/ppy/osu.git
synced 2024-12-16 14:22:55 +08:00
Actually use mapName whoops
This commit is contained in:
parent
f819ffce2b
commit
2e5a7374a8
@ -307,10 +307,11 @@ namespace osu.Game.Beatmaps
|
|||||||
/// <returns>The imported beatmap, or an existing instance if it is already present.</returns>
|
/// <returns>The imported beatmap, or an existing instance if it is already present.</returns>
|
||||||
private BeatmapSetInfo importToStorage(ArchiveReader reader)
|
private BeatmapSetInfo importToStorage(ArchiveReader reader)
|
||||||
{
|
{
|
||||||
|
string mapName;
|
||||||
// let's make sure there are actually .osu files to import.
|
// let's make sure there are actually .osu files to import.
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
string mapName = reader.Filenames.First(f => f.EndsWith(".osu"));
|
mapName = reader.Filenames.First(f => f.EndsWith(".osu"));
|
||||||
}
|
}
|
||||||
catch
|
catch
|
||||||
{
|
{
|
||||||
@ -349,7 +350,7 @@ namespace osu.Game.Beatmaps
|
|||||||
|
|
||||||
BeatmapMetadata metadata;
|
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;
|
metadata = BeatmapDecoder.GetDecoder(stream).Decode(stream).Metadata;
|
||||||
|
|
||||||
beatmapSet = new BeatmapSetInfo
|
beatmapSet = new BeatmapSetInfo
|
||||||
|
Loading…
Reference in New Issue
Block a user