Merge pull request #3984 from glassez/root_path

Fix TorrentHandle path methods. Closes #3847.
This commit is contained in:
sledgehammer999 2015-11-06 16:03:48 -06:00
commit 472fff06dc
9 changed files with 90 additions and 54 deletions

View file

@ -511,7 +511,7 @@ QByteArray btjson::getPropertiesForTorrent(const QString& hash)
dataDict[KEY_PROP_COMPLETION_DATE] = -1;
dataDict[KEY_PROP_CREATION_DATE] = -1;
}
dataDict[KEY_PROP_SAVE_PATH] = Utils::Fs::toNativePath(torrent->rootPath());
dataDict[KEY_PROP_SAVE_PATH] = Utils::Fs::toNativePath(torrent->savePath());
dataDict[KEY_PROP_COMMENT] = torrent->comment();
return json::toJson(dataDict);
@ -637,7 +637,7 @@ QVariantMap toMap(BitTorrent::TorrentHandle *const torrent)
ret[KEY_TORRENT_LABEL] = torrent->label();
ret[KEY_TORRENT_SUPER_SEEDING] = torrent->superSeeding();
ret[KEY_TORRENT_FORCE_START] = torrent->isForced();
ret[KEY_TORRENT_SAVE_PATH] = Utils::Fs::toNativePath(torrent->rootPath());
ret[KEY_TORRENT_SAVE_PATH] = Utils::Fs::toNativePath(torrent->savePath());
return ret;
}