From feeecbf395a839f25ee71dfcc2ddf6548a8cd8ee Mon Sep 17 00:00:00 2001 From: Christophe Dumez Date: Thu, 10 Mar 2011 17:46:56 +0000 Subject: [PATCH] Fix root folder being cut off if the torrent comes from a scanned folder (Christian Kandeler) --- src/qtlibtorrent/qbtsession.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/qtlibtorrent/qbtsession.cpp b/src/qtlibtorrent/qbtsession.cpp index fe7324fc3..05a68ca37 100644 --- a/src/qtlibtorrent/qbtsession.cpp +++ b/src/qtlibtorrent/qbtsession.cpp @@ -2472,12 +2472,12 @@ QString QBtSession::getSavePath(const QString &hash, bool fromScanDir, QString f qDebug("SavePath got from persistant data is %s", qPrintable(savePath)); bool append_root_folder = false; if(savePath.isEmpty()) { - if(fromScanDir && m_scanFolders->downloadInTorrentFolder(filePath)) + if(fromScanDir && m_scanFolders->downloadInTorrentFolder(filePath)) { savePath = QFileInfo(filePath).dir().path(); - else { + } else { savePath = defaultSavePath; - append_root_folder = true; } + append_root_folder = true; } if(!fromScanDir && appendLabelToSavePath) { const QString label = TorrentPersistentData::getLabel(hash);