mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2024-12-27 08:19:30 +08:00
Allow add torrents with relative save path
The relative save path will be resoloved against the default one.
This commit is contained in:
parent
a51742b47c
commit
89cedd411e
@ -2062,8 +2062,10 @@ LoadTorrentParams Session::initLoadTorrentParams(const AddTorrentParams &addTorr
|
||||
const bool useAutoTMM = addTorrentParams.useAutoTMM.value_or(!isAutoTMMDisabledByDefault());
|
||||
if (useAutoTMM)
|
||||
loadTorrentParams.savePath = "";
|
||||
else if (addTorrentParams.savePath.trimmed().isEmpty())
|
||||
else if (addTorrentParams.savePath.isEmpty())
|
||||
loadTorrentParams.savePath = defaultSavePath();
|
||||
else if (QDir(addTorrentParams.savePath).isRelative())
|
||||
loadTorrentParams.savePath = QDir(defaultSavePath()).absoluteFilePath(addTorrentParams.savePath);
|
||||
else
|
||||
loadTorrentParams.savePath = normalizePath(addTorrentParams.savePath);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user