BUGFIX: Remove empty folders on torrent soft deletion (closes #695174)

This commit is contained in:
Christophe Dumez
2010-12-29 20:31:45 +00:00
parent 28409b83c3
commit 55b0cac61b
5 changed files with 17 additions and 19 deletions

View File

@@ -631,7 +631,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;
}