Correctly handle changing of temp save path

PR #16753.
This commit is contained in:
Vladimir Golovnev
2022-03-28 07:32:13 +03:00
committed by GitHub
parent c1b38221d2
commit 011ac90a52

View File

@@ -2479,7 +2479,7 @@ void Session::setDownloadPath(const QString &path)
{ {
const QString baseDownloadPath = specialFolderLocation(SpecialFolder::Downloads) + QLatin1String("/temp"); const QString baseDownloadPath = specialFolderLocation(SpecialFolder::Downloads) + QLatin1String("/temp");
const QString resolvedPath = (QDir::isAbsolutePath(path) ? path : Utils::Fs::resolvePath(path, baseDownloadPath)); const QString resolvedPath = (QDir::isAbsolutePath(path) ? path : Utils::Fs::resolvePath(path, baseDownloadPath));
if (resolvedPath != m_downloadPath) if (resolvedPath == m_downloadPath)
return; return;
if (isDisableAutoTMMWhenDefaultSavePathChanged()) if (isDisableAutoTMMWhenDefaultSavePathChanged())