mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-19 06:57:24 -06:00
Remove empty folders on torrent soft deletion
Code clean up
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user