Fix root folder being cut off if the torrent comes from a scanned folder (Christian Kandeler)

This commit is contained in:
Christophe Dumez
2011-03-10 17:49:12 +00:00
parent 1c313c7c06
commit 92c70bc878
2 changed files with 5 additions and 3 deletions

View File

@@ -2414,12 +2414,12 @@ QString QBtSession::getSavePath(QString hash, bool fromScanDir, QString filePath
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);