1
0
mirror of https://github.com/ppy/osu.git synced 2025-03-22 21:00:33 +08:00

Fix regex by allowing file extensions + typed new

Apparently, the _whole_ filename was checked with GetValidArchiveContentFilename,
not just the stem.
This commit is contained in:
nullium21 2022-10-28 09:19:34 +03:00
parent 68d1febe6e
commit c1e9398c19

View File

@ -137,7 +137,7 @@ namespace osu.Game.Extensions
return instance.OnlineID.Equals(other.OnlineID);
}
private static Regex invalid_filename_chars = new(@"(?!$)[^A-Za-z0-9_()[\] -]", RegexOptions.Compiled);
private static Regex invalid_filename_chars = new Regex(@"(?!$)[^A-Za-z0-9_()[\]. -]", RegexOptions.Compiled);
/// <summary>
/// Get a valid filename for use inside a zip file. Avoids backslashes being incorrectly converted to directories.