mirror of
https://github.com/ppy/osu.git
synced 2025-01-28 16:12:57 +08:00
fix(AudioCheckUtils): use Path.GetExtension()
To avoid filename escaping
This commit is contained in:
parent
5f00d3e2a4
commit
2e2dcd99a6
@ -1,6 +1,7 @@
|
||||
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
||||
// See the LICENCE file in the repository root for full licence text.
|
||||
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
|
||||
namespace osu.Game.Rulesets.Edit.Checks.Components
|
||||
@ -9,6 +10,6 @@ namespace osu.Game.Rulesets.Edit.Checks.Components
|
||||
{
|
||||
public static readonly string[] AUDIO_EXTENSIONS = { "mp3", "ogg", "wav" };
|
||||
|
||||
public static bool HasAudioExtension(string filename) => AUDIO_EXTENSIONS.Any(filename.ToLowerInvariant().EndsWith);
|
||||
public static bool HasAudioExtension(string filename) => AUDIO_EXTENSIONS.Any(Path.GetExtension(filename).ToLowerInvariant().EndsWith);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user