Merge pull request #10792 from Chocobo1/rename2

Remove empty leftover folders after rename properly
This commit is contained in:
Mike Tzou
2019-06-16 12:22:22 +08:00
committed by GitHub
6 changed files with 82 additions and 35 deletions

View File

@@ -204,15 +204,6 @@ void TorrentContentTreeView::renameSelectedFile(BitTorrent::TorrentHandle *torre
if (needForceRecheck)
torrent->forceRecheck();
// Remove old folder
const QString oldFullPath = torrent->savePath(true) + oldPath;
int timeout = 10;
while (!QDir().rmpath(oldFullPath) && (timeout > 0)) {
// FIXME: We should not sleep here (freezes the UI for 1 second)
QThread::msleep(100);
--timeout;
}
model->setData(modelIndex, newName);
}
}