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

@@ -1,5 +1,7 @@
* Unreleased - Christophe Dumez <chris@qbittorrent.org> - v2.6.8
- BUFIX: Fix compilation with libtorrent v0.14.x
- BUGFIX: Fix issues when writing on NTFS (Linux, Mac)
- BUGFIX: Fix root folder being cut off if the torrent comes from a scanned folder (Christian Kandeler)
* Sat Feb 26 2011 - Christophe Dumez <chris@qbittorrent.org> - v2.6.7
- BUGFIX: Encoding fixes (Windows)

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);