From 88114b4588985bb9f68aea1439239936b1b02739 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 a84c74b5c..7a9baa502 100644 --- a/src/base/bittorrent/torrentimpl.cpp +++ b/src/base/bittorrent/torrentimpl.cpp @@ -2081,7 +2081,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