diff --git a/src/bittorrent.cpp b/src/bittorrent.cpp index fbfc7b965..787304e1b 100644 --- a/src/bittorrent.cpp +++ b/src/bittorrent.cpp @@ -750,13 +750,15 @@ bool bittorrent::pauseTorrent(QString hash) { // Remove it from TorrentsStartTime hash table TorrentsStartTime.remove(hash); TorrentsStartData.remove(hash); - // Remove it from queued list if present - if(queuedDownloads->contains(hash)) - queuedDownloads->removeAll(hash); - if(queuedUploads->contains(hash)) - queuedUploads->removeAll(hash); - if(QFile::exists(misc::qBittorrentPath()+"BT_backup"+QDir::separator()+hash+".queued")) - QFile::remove(misc::qBittorrentPath()+"BT_backup"+QDir::separator()+hash+".queued"); + if(queueingEnabled) { + // Remove it from queued list if present + if(queuedDownloads->contains(hash)) + queuedDownloads->removeAll(hash); + if(queuedUploads->contains(hash)) + queuedUploads->removeAll(hash); + if(QFile::exists(misc::qBittorrentPath()+"BT_backup"+QDir::separator()+hash+".queued")) + QFile::remove(misc::qBittorrentPath()+"BT_backup"+QDir::separator()+hash+".queued"); + } return change; }