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); 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> /// <summary>
/// Get a valid filename for use inside a zip file. Avoids backslashes being incorrectly converted to directories. /// Get a valid filename for use inside a zip file. Avoids backslashes being incorrectly converted to directories.