Fix TorrentHandle rootPath() and contentPath() methods

This commit is contained in:
Vladimir Golovnev (Glassez) 2016-01-06 10:26:57 +03:00
parent d413bc65ef
commit 6d7d566cdf
3 changed files with 13 additions and 2 deletions

View file

@ -1405,7 +1405,9 @@ bool Session::deleteTorrent(const QString &hash, bool deleteLocalFiles)
// Remove it from session
if (deleteLocalFiles) {
m_savePathsToRemove[torrent->hash()] = torrent->rootPath(true);
QString rootPath = torrent->rootPath(true);
if (!rootPath.isEmpty())
m_savePathsToRemove[torrent->hash()] = rootPath;
m_nativeSession->remove_torrent(torrent->nativeHandle(), libt::session::delete_files);
}
else {