mirror of
https://github.com/ppy/osu
synced 2025-03-02 09:30:57 +00:00
Fix same-name safety firing wrongly
This commit is contained in:
parent
afc48d86df
commit
47429fb0c6
@ -74,7 +74,7 @@ namespace osu.Game.Beatmaps
|
|||||||
string targetFilename = getFilename(beatmapInfo);
|
string targetFilename = getFilename(beatmapInfo);
|
||||||
|
|
||||||
// ensure that two difficulties from the set don't point at the same beatmap file.
|
// ensure that two difficulties from the set don't point at the same beatmap file.
|
||||||
if (setInfo.Beatmaps.Any(b => string.Equals(b.Path, targetFilename, StringComparison.OrdinalIgnoreCase)))
|
if (setInfo.Beatmaps.Any(b => b.ID != beatmapInfo.ID && string.Equals(b.Path, targetFilename, StringComparison.OrdinalIgnoreCase)))
|
||||||
throw new InvalidOperationException($"{setInfo.GetDisplayString()} already has a difficulty with the name of '{beatmapInfo.DifficultyName}'.");
|
throw new InvalidOperationException($"{setInfo.GetDisplayString()} already has a difficulty with the name of '{beatmapInfo.DifficultyName}'.");
|
||||||
|
|
||||||
if (existingFileInfo != null)
|
if (existingFileInfo != null)
|
||||||
|
Loading…
Reference in New Issue
Block a user