mirror of
https://github.com/Rosalie241/RMG.git
synced 2026-11-18 03:34:03 +01:00
RMG: simplify sanitizing filename in RomBrowserWidget
This commit is contained in:
1 parent
9cfda8514e
commit
e7767105d6
1 file changed
+1
-7
@@ -390,14 +390,8 @@ QIcon RomBrowserWidget::getCurrentCover(QString file, CoreRomHeader header, Core
|
||||
{
|
||||
// fixup file name
|
||||
QString fixedName = name;
|
||||
for (const char c : ":<>\"/\\|?*")
|
||||
for (const QChar c : QString(":<>\"/\\|?*"))
|
||||
{
|
||||
// skip empty characters
|
||||
if (c == '\0')
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
fixedName.replace(c, "_");
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user