From 52b54fe15439fa1da90308c84cf71be81cdf2a20 Mon Sep 17 00:00:00 2001 From: "Vladimir Golovnev (Glassez)" Date: Sun, 9 Jan 2022 21:14:49 +0300 Subject: [PATCH] Don't try to move storage into its current location --- src/base/bittorrent/torrentimpl.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/base/bittorrent/torrentimpl.cpp b/src/base/bittorrent/torrentimpl.cpp index 7782f8059..c29adb4c7 100644 --- a/src/base/bittorrent/torrentimpl.cpp +++ b/src/base/bittorrent/torrentimpl.cpp @@ -2074,7 +2074,8 @@ void TorrentImpl::adjustStorageLocation() const bool isFinished = isSeed() || m_hasSeedStatus; const QDir targetDir {((isFinished || downloadPath.isEmpty()) ? savePath() : downloadPath)}; - moveStorage(targetDir.absolutePath(), MoveStorageMode::Overwrite); + if ((targetDir != QDir(actualStorageLocation())) || isMoveInProgress()) + moveStorage(targetDir.absolutePath(), MoveStorageMode::Overwrite); } lt::torrent_handle TorrentImpl::nativeHandle() const