mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-20 15:37:26 -06:00
Allow to use Category paths in "Manual" mode
If the option is enabled any relative save path will be resolved against an appropriate Category path instead of Global default one. PR #16330.
This commit is contained in:
committed by
GitHub
parent
0012a3ede7
commit
facfa26eed
@@ -405,7 +405,9 @@ void TorrentImpl::setSavePath(const QString &path)
|
||||
{
|
||||
Q_ASSERT(!isAutoTMMEnabled());
|
||||
|
||||
const QString resolvedPath = (QDir::isAbsolutePath(path) ? path : Utils::Fs::resolvePath(path, m_session->savePath()));
|
||||
const QString basePath = m_session->useCategoryPathsInManualMode()
|
||||
? m_session->categorySavePath(category()) : m_session->savePath();
|
||||
const QString resolvedPath = (QDir::isAbsolutePath(path) ? path : Utils::Fs::resolvePath(path, basePath));
|
||||
if (resolvedPath == savePath())
|
||||
return;
|
||||
|
||||
@@ -427,8 +429,9 @@ void TorrentImpl::setDownloadPath(const QString &path)
|
||||
{
|
||||
Q_ASSERT(!isAutoTMMEnabled());
|
||||
|
||||
const QString resolvedPath = ((path.isEmpty() || QDir::isAbsolutePath(path))
|
||||
? path : Utils::Fs::resolvePath(path, m_session->downloadPath()));
|
||||
const QString basePath = m_session->useCategoryPathsInManualMode()
|
||||
? m_session->categoryDownloadPath(category()) : m_session->downloadPath();
|
||||
const QString resolvedPath = ((path.isEmpty() || QDir::isAbsolutePath(path)) ? path : Utils::Fs::resolvePath(path, basePath));
|
||||
if (resolvedPath == m_downloadPath)
|
||||
return;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user