1
0
mirror of https://github.com/d47081/qBittorrent.git synced 2025-01-14 08:48:17 +00:00

Optimize check of paths in qbtsession.

This commit is contained in:
sledgehammer999 2012-12-01 15:40:18 +02:00
parent 3e979931d0
commit a899209a01

View File

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