mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-08-20 13:23:34 -07:00
Don't remove parent directories
QDir::rmpath removes *all* parent directories while QDir::rmdir removes the specified directory.
This commit is contained in:
parent
e329c41ef2
commit
d376d912b3
1 changed files with 1 additions and 1 deletions
|
@ -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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue