mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-08-14 02:27:09 -07:00
- Improved resumeUnfinishedTorrents using a "*.torrent" filter
This commit is contained in:
parent
e66af5b271
commit
5518144b26
1 changed files with 4 additions and 4 deletions
|
@ -1146,12 +1146,12 @@ void bittorrent::resumeUnfinishedTorrents(){
|
||||||
QDir torrentBackup(misc::qBittorrentPath() + "BT_backup");
|
QDir torrentBackup(misc::qBittorrentPath() + "BT_backup");
|
||||||
QStringList fileNames, filePaths;
|
QStringList fileNames, filePaths;
|
||||||
// Scan torrentBackup directory
|
// Scan torrentBackup directory
|
||||||
fileNames = torrentBackup.entryList();
|
QStringList filters;
|
||||||
|
filters << "*.torrent";
|
||||||
|
fileNames = torrentBackup.entryList(filters, QDir::Files, QDir::Unsorted);
|
||||||
QString fileName;
|
QString fileName;
|
||||||
foreach(fileName, fileNames){
|
foreach(fileName, fileNames){
|
||||||
if(fileName.endsWith(".torrent")){
|
filePaths.append(torrentBackup.path()+QDir::separator()+fileName);
|
||||||
filePaths.append(torrentBackup.path()+QDir::separator()+fileName);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
// Resume downloads
|
// Resume downloads
|
||||||
foreach(fileName, filePaths){
|
foreach(fileName, filePaths){
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue