mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-31 03:50:20 -07:00
Improve torrent export feature. Closes #4205.
This commit is contained in:
parent
7b6a1a1955
commit
3d4e1a8127
4 changed files with 21 additions and 54 deletions
|
@ -250,13 +250,15 @@ bool Utils::Fs::sameFiles(const QString& path1, const QString& path2)
|
|||
return same;
|
||||
}
|
||||
|
||||
QString Utils::Fs::toValidFileSystemName(QString filename)
|
||||
QString Utils::Fs::toValidFileSystemName(const QString &filename)
|
||||
{
|
||||
qDebug("toValidFSName: %s", qPrintable(filename));
|
||||
const QRegExp regex("[\\\\/:?\"*<>|]");
|
||||
filename.replace(regex, " ");
|
||||
qDebug("toValidFSName, result: %s", qPrintable(filename));
|
||||
return filename.trimmed();
|
||||
static const QRegExp regex("[\\\\/:?\"*<>|]");
|
||||
|
||||
QString validName = filename.trimmed();
|
||||
validName.replace(regex, " ");
|
||||
qDebug() << "toValidFileSystemName:" << filename << "=>" << validName;
|
||||
|
||||
return validName;
|
||||
}
|
||||
|
||||
bool Utils::Fs::isValidFileSystemName(const QString& filename)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue