mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2024-12-27 08:19:30 +08:00
Clean up misc::toValidFileSystemName()
This commit is contained in:
parent
68041e382d
commit
fb03682df4
@ -568,11 +568,10 @@ QString misc::updateLabelInSavePath(QString defaultSavePath, QString save_path,
|
||||
|
||||
QString misc::toValidFileSystemName(QString filename) {
|
||||
qDebug("toValidFSName: %s", qPrintable(filename));
|
||||
filename.replace("\\", "/").trimmed();
|
||||
const QRegExp regex("[/:?\"*<>|]");
|
||||
filename.replace(regex, " ").trimmed();
|
||||
const QRegExp regex("[\\\\/:?\"*<>|]");
|
||||
filename.replace(regex, " ");
|
||||
qDebug("toValidFSName, result: %s", qPrintable(filename));
|
||||
return filename;
|
||||
return filename.trimmed();
|
||||
}
|
||||
|
||||
bool misc::isValidFileSystemName(const QString& filename) {
|
||||
|
Loading…
Reference in New Issue
Block a user