After files relocate, don't remove the old folder even if it is empty.

This commit is contained in:
Chocobo1 2016-12-27 22:35:49 +08:00 committed by sledgehammer999
commit 0333e23710
No known key found for this signature in database
GPG key ID: 6E4A2D025B7CC9A2

View file

@ -1373,13 +1373,6 @@ void TorrentHandle::handleStorageMovedAlert(libtorrent::storage_moved_alert *p)
m_session->handleTorrentSavePathChanged(this);
}
// Attempt to remove old folder if empty
QDir oldSaveDir(Utils::Fs::fromNativePath(m_oldPath));
if (oldSaveDir != QDir(m_session->defaultSavePath())) {
qDebug("Attempting to remove %s", qPrintable(m_oldPath));
QDir().rmpath(m_oldPath);
}
while (!isMoveInProgress() && (m_renameCount == 0) && !m_moveFinishedTriggers.isEmpty())
m_moveFinishedTriggers.takeFirst()();
}