mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-16 02:03:07 -07:00
Remove empty folders on torrent soft deletion
Code clean up
This commit is contained in:
parent
20d90e0e0c
commit
cc4e1c5bbe
4 changed files with 16 additions and 19 deletions
|
@ -640,7 +640,8 @@ void PropertiesWidget::renameSelectedFile() {
|
|||
// Remove old folder
|
||||
const QDir old_folder(h.save_path()+"/"+old_path);
|
||||
int timeout = 10;
|
||||
while(!misc::removeEmptyTree(old_folder.absolutePath()) && timeout > 0) {
|
||||
while(!QDir().rmpath(old_folder.absolutePath()) && timeout > 0) {
|
||||
// XXX: We should not sleep here (freezes the UI for 1 second)
|
||||
SleeperThread::msleep(100);
|
||||
--timeout;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue