1
0
mirror of https://github.com/d47081/qBittorrent.git synced 2025-02-02 09:55:55 +00:00

Other temp path fixes

This commit is contained in:
Christophe Dumez 2010-07-17 21:12:13 +00:00
parent f9684d662d
commit 5be2624cb1

View File

@ -1705,8 +1705,15 @@ void Bittorrent::addConsoleMessage(QString msg, QString) {
for(torrentIT = torrents.begin(); torrentIT != torrents.end(); torrentIT++) {
QTorrentHandle h = QTorrentHandle(*torrentIT);
if(!h.is_valid()) continue;
if(!h.is_seed())
h.move_storage(temppath);
if(!h.is_seed()) {
QString root_folder = TorrentPersistentData::getRootFolder(h.hash());
QString torrent_tmp_path = defaultTempPath.replace("\\", "/");
if(!root_folder.isEmpty()) {
if(!torrent_tmp_path.endsWith("/")) torrent_tmp_path += "/";
torrent_tmp_path += root_folder;
}
h.move_storage(torrent_tmp_path);
}
}
}
defaultTempPath = temppath;
@ -2157,7 +2164,8 @@ void Bittorrent::addConsoleMessage(QString msg, QString) {
appendqBextensionToTorrent(h, true);
#endif
// Truncate root folder
misc::truncateRootFolder(p->handle);
QString root_folder = misc::truncateRootFolder(p->handle);
TorrentPersistentData::setRootFolder(h.hash(), root_folder);
emit metadataReceived(h);
if(h.is_paused()) {
// XXX: Unfortunately libtorrent-rasterbar does not send a torrent_paused_alert