Correctly concatenate paths

PR #16086.
This commit is contained in:
Vladimir Golovnev 2022-01-14 15:17:17 +03:00 committed by GitHub
parent 0a1e864f74
commit 210fd80167
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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();
}