1
0
mirror of https://github.com/d47081/qBittorrent.git synced 2025-01-10 14:57:52 +00:00

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:46:56 +00:00
parent e7abeb9bd4
commit feeecbf395

View File

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