mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-21 16:07:23 -06:00
Merge pull request #10792 from Chocobo1/rename2
Remove empty leftover folders after rename properly
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user