Fix hash validity check function returning incorrect results after soft deleting a beatmap

The soft-deleted one would potentially match before the newly imported
copy, resulting in a false-positive hash mismatch.
This commit is contained in:
Dean Herbert 2021-11-01 15:15:41 +09:00
parent 123b10f647
commit 227963047a

View File

@ -109,8 +109,7 @@ namespace osu.Game.Online.Rooms
int onlineId = SelectedItem.Value.Beatmap.Value.OnlineID;
string checksum = SelectedItem.Value.Beatmap.Value.MD5Hash;
var beatmap = beatmapManager.QueryBeatmap(b => b.OnlineBeatmapID == onlineId && b.MD5Hash == checksum);
return beatmap?.BeatmapSet.DeletePending == false;
return beatmapManager.QueryBeatmap(b => b.OnlineBeatmapID == onlineId && b.MD5Hash == checksum && !b.BeatmapSet.DeletePending) != null;
}
}
}