From fd4f46485ce6ad4cfd3e0107b9a47f6f236082dc Mon Sep 17 00:00:00 2001 From: Christophe Dumez Date: Wed, 13 Apr 2011 17:32:28 +0000 Subject: [PATCH] Improve last patch --- src/qtlibtorrent/qbtsession.cpp | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/src/qtlibtorrent/qbtsession.cpp b/src/qtlibtorrent/qbtsession.cpp index 05f4f7244..1e49e06f7 100644 --- a/src/qtlibtorrent/qbtsession.cpp +++ b/src/qtlibtorrent/qbtsession.cpp @@ -298,18 +298,6 @@ void QBtSession::configureSession() { #endif preAllocateAllFiles(pref.preAllocateAllFiles()); startTorrentsInPause(pref.addTorrentsInPause()); - // * Scan dirs - const QStringList scan_dirs = pref.getScanDirs(); - QList downloadInDirList = pref.getDownloadInScanDirs(); - while(scan_dirs.size() > downloadInDirList.size()) { - downloadInDirList << false; - } - int i = 0; - foreach (const QString &dir, scan_dirs) { - qDebug() << "Adding scan dir" << dir << downloadInDirList.at(i); - m_scanFolders->addPath(dir, downloadInDirList.at(i)); - ++i; - } // * Export Dir const bool newTorrentExport = pref.isTorrentExportEnabled(); if(torrentExport != newTorrentExport) { @@ -586,6 +574,18 @@ void QBtSession::configureSession() { if(m_tracker) delete m_tracker; } + // * Scan dirs + const QStringList scan_dirs = pref.getScanDirs(); + QList downloadInDirList = pref.getDownloadInScanDirs(); + while(scan_dirs.size() > downloadInDirList.size()) { + downloadInDirList << false; + } + int i = 0; + foreach (const QString &dir, scan_dirs) { + qDebug() << "Adding scan dir" << dir << downloadInDirList.at(i); + m_scanFolders->addPath(dir, downloadInDirList.at(i)); + ++i; + } qDebug("Session configured"); }