diff options
| -rw-r--r-- | src/downloadmanager.cpp | 6 | ||||
| -rw-r--r-- | src/downloadmanager.h | 2 | ||||
| -rw-r--r-- | src/organizercore.cpp | 2 |
3 files changed, 6 insertions, 4 deletions
diff --git a/src/downloadmanager.cpp b/src/downloadmanager.cpp index 7b416d50..bbf2f79e 100644 --- a/src/downloadmanager.cpp +++ b/src/downloadmanager.cpp @@ -281,14 +281,16 @@ void DownloadManager::pauseAll() } -void DownloadManager::setOutputDirectory(const QString &outputDirectory) +void DownloadManager::setOutputDirectory(const QString &outputDirectory, const bool refresh) { QStringList directories = m_DirWatcher.directories(); if (directories.length() != 0) { m_DirWatcher.removePaths(directories); } m_OutputDirectory = QDir::fromNativeSeparators(outputDirectory); - refreshList(); + if (refresh) { + refreshList(); + } m_DirWatcher.addPath(m_OutputDirectory); } diff --git a/src/downloadmanager.h b/src/downloadmanager.h index 4fc61cad..d6342f22 100644 --- a/src/downloadmanager.h +++ b/src/downloadmanager.h @@ -158,7 +158,7 @@ public: * * @param outputDirectory the new output directory **/ - void setOutputDirectory(const QString &outputDirectory); + void setOutputDirectory(const QString &outputDirectory, const bool refresh = true); /** * @brief disables feedback from the downlods fileSystemWhatcher untill disableDownloadsWatcherEnd() is called diff --git a/src/organizercore.cpp b/src/organizercore.cpp index 18c8bcd4..12302df2 100644 --- a/src/organizercore.cpp +++ b/src/organizercore.cpp @@ -106,7 +106,7 @@ OrganizerCore::OrganizerCore(Settings &settings) , m_ArchivesInit(false) , m_PluginListsWriter(std::bind(&OrganizerCore::savePluginList, this)) { - m_DownloadManager.setOutputDirectory(m_Settings.paths().downloads()); + m_DownloadManager.setOutputDirectory(m_Settings.paths().downloads(), false); NexusInterface::instance(m_PluginContainer)->setCacheDirectory( m_Settings.paths().cache()); |
