Remove torrent temp folder if it becomes unneeded

This commit is contained in:
Vladimir Golovnev (Glassez) 2017-04-26 11:38:50 +03:00 committed by sledgehammer999
commit 66b92f3bb4
No known key found for this signature in database
GPG key ID: 6E4A2D025B7CC9A2

View file

@ -1330,6 +1330,10 @@ void TorrentHandle::handleStorageMovedAlert(libtorrent::storage_moved_alert *p)
} }
qDebug("Torrent is successfully moved from %s to %s", qPrintable(m_oldPath), qPrintable(m_newPath)); qDebug("Torrent is successfully moved from %s to %s", qPrintable(m_oldPath), qPrintable(m_newPath));
if (m_oldPath == m_session->torrentTempPath(hash())) {
qDebug() << "Removing torrent temp folder:" << m_oldPath;
Utils::Fs::smartRemoveEmptyFolderTree(m_oldPath);
}
updateStatus(); updateStatus();
m_newPath.clear(); m_newPath.clear();