mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-18 06:28:03 -06:00
Don't remove parent directories
QDir::rmpath removes *all* parent directories while QDir::rmdir removes the specified directory.
This commit is contained in:
@@ -1944,7 +1944,7 @@ bool Session::deleteTorrent(const QString &hash, bool deleteLocalFiles)
|
|||||||
Utils::Fs::forceRemove(unwantedFile);
|
Utils::Fs::forceRemove(unwantedFile);
|
||||||
const QString parentFolder = Utils::Fs::branchPath(unwantedFile);
|
const QString parentFolder = Utils::Fs::branchPath(unwantedFile);
|
||||||
qDebug("Attempt to remove parent folder (if empty): %s", qUtf8Printable(parentFolder));
|
qDebug("Attempt to remove parent folder (if empty): %s", qUtf8Printable(parentFolder));
|
||||||
QDir().rmpath(parentFolder);
|
QDir().rmdir(parentFolder);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user