mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2024-11-28 05:27:15 +03:00
parent
ee0f38a696
commit
7113174593
2 changed files with 2 additions and 2 deletions
|
@ -160,7 +160,7 @@ void FileSystemWatcher::processTorrentsInDir(const QDir &dir)
|
|||
const QStringList files = dir.entryList({"*.torrent", "*.magnet"}, QDir::Files);
|
||||
for (const QString &file : files) {
|
||||
const QString fileAbsPath = dir.absoluteFilePath(file);
|
||||
if (file.endsWith(".magnet"))
|
||||
if (file.endsWith(".magnet", Qt::CaseInsensitive))
|
||||
torrents << fileAbsPath;
|
||||
else if (BitTorrent::TorrentInfo::loadFromFile(fileAbsPath).isValid())
|
||||
torrents << fileAbsPath;
|
||||
|
|
|
@ -360,7 +360,7 @@ void ScanFoldersModel::addTorrentsToSession(const QStringList &pathList)
|
|||
else if (!downloadInDefaultFolder(file))
|
||||
params.savePath = downloadPathTorrentFolder(file);
|
||||
|
||||
if (file.endsWith(".magnet")) {
|
||||
if (file.endsWith(".magnet", Qt::CaseInsensitive)) {
|
||||
QFile f(file);
|
||||
if (f.open(QIODevice::ReadOnly | QIODevice::Text)) {
|
||||
QTextStream str(&f);
|
||||
|
|
Loading…
Reference in a new issue