Fix unicode characters being invalid in filenames

Signed-off-by: TheKodeToad <TheKodeToad@proton.me>
(cherry picked from commit 9986fe4c45)
This commit is contained in:
TheKodeToad 2024-04-06 13:28:42 +01:00 committed by github-actions[bot]
parent acfd05a70e
commit e43341ce92

View File

@ -807,7 +807,7 @@ static const QString BAD_FILENAME_CHARS = BAD_PATH_CHARS + "\\/";
QString RemoveInvalidFilenameChars(QString string, QChar replaceWith)
{
for (int i = 0; i < string.length(); i++)
if (string.at(i).toLatin1() < ' ' || BAD_FILENAME_CHARS.contains(string.at(i)))
if (string.at(i) < ' ' || BAD_FILENAME_CHARS.contains(string.at(i)))
string[i] = replaceWith;
return string;