- Fixed remembering of paused torrents cleanly

This commit is contained in:
Christophe Dumez 2008-12-27 17:05:26 +00:00
parent 71e3061c18
commit cd260198f9
3 changed files with 5 additions and 9 deletions

View file

@ -315,12 +315,12 @@ void QTorrentHandle::set_upload_limit(int limit) {
h.set_upload_limit(limit);
}
void QTorrentHandle::pause(bool create_file) {
void QTorrentHandle::pause() {
Q_ASSERT(h.is_valid());
h.auto_managed(false);
h.pause();
// Create .paused file if necessary
if(create_file && !QFile::exists(misc::qBittorrentPath()+"BT_backup"+QDir::separator()+hash()+".paused")) {
if(!QFile::exists(misc::qBittorrentPath()+"BT_backup"+QDir::separator()+hash()+".paused")) {
QFile paused_file(misc::qBittorrentPath()+"BT_backup"+QDir::separator()+hash()+".paused");
paused_file.open(QIODevice::WriteOnly | QIODevice::Text);
paused_file.close();