mirror of
https://github.com/ppy/osu
synced 2024-12-24 15:53:37 +00:00
Move difficulty copy inside context retrieval
This commit is contained in:
parent
d3efec3c04
commit
ee66414e4f
@ -192,8 +192,6 @@ namespace osu.Game.Beatmaps
|
||||
{
|
||||
var setInfo = beatmapInfo.BeatmapSet;
|
||||
|
||||
beatmapInfo.BaseDifficulty.CopyFrom(beatmapContent.Difficulty);
|
||||
|
||||
using (var stream = new MemoryStream())
|
||||
{
|
||||
using (var sw = new StreamWriter(stream, Encoding.UTF8, 1024, true))
|
||||
@ -204,6 +202,8 @@ namespace osu.Game.Beatmaps
|
||||
using (ContextFactory.GetForWrite())
|
||||
{
|
||||
beatmapInfo = setInfo.Beatmaps.Single(b => b.ID == beatmapInfo.ID);
|
||||
beatmapInfo.BaseDifficulty.CopyFrom(beatmapContent.Difficulty);
|
||||
|
||||
var metadata = beatmapInfo.Metadata ?? setInfo.Metadata;
|
||||
|
||||
// grab the original file (or create a new one if not found).
|
||||
|
Loading…
Reference in New Issue
Block a user