From a899209a01fb42ebdb5e6444f5471b16d0709c84 Mon Sep 17 00:00:00 2001 From: sledgehammer999 Date: Sat, 1 Dec 2012 15:40:18 +0200 Subject: [PATCH] Optimize check of paths in qbtsession. --- src/qtlibtorrent/qbtsession.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/qtlibtorrent/qbtsession.cpp b/src/qtlibtorrent/qbtsession.cpp index cd4c3f421..8235901a3 100755 --- a/src/qtlibtorrent/qbtsession.cpp +++ b/src/qtlibtorrent/qbtsession.cpp @@ -1774,14 +1774,16 @@ void QBtSession::addTorrentsFromScanFolder(QStringList &pathList) { } void QBtSession::setDefaultSavePath(const QString &savepath) { - if (defaultSavePath == savepath || savepath.isEmpty()) + if (QDir(defaultSavePath) == QDir(savepath) || savepath.isEmpty()) return; + defaultSavePath = QDir::fromNativeSeparators(savepath); } void QBtSession::setDefaultTempPath(const QString &temppath) { - if (defaultTempPath == temppath) + if (QDir(defaultTempPath) == QDir(temppath)) return; + if (temppath.isEmpty()) { // Disabling temp dir // Moving all torrents to their destination folder