diff --git a/src/base/bittorrent/torrentimpl.cpp b/src/base/bittorrent/torrentimpl.cpp index 7f67e2af3..74ffbc4ae 100644 --- a/src/base/bittorrent/torrentimpl.cpp +++ b/src/base/bittorrent/torrentimpl.cpp @@ -1892,9 +1892,10 @@ void TorrentImpl::handleFileRenamedAlert(const lt::file_renamed_alert *p) ++pathIdx; } + QDir storageDir {actualStorageLocation()}; for (int i = (oldPathParts.size() - 1); i >= pathIdx; --i) { - QDir().rmdir(savePath() + Utils::String::join(oldPathParts, QString::fromLatin1("/"))); + storageDir.rmdir(Utils::String::join(oldPathParts, QString::fromLatin1("/"))); oldPathParts.removeLast(); }