mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-02-02 18:04:32 +00:00
Other temp path fixes
This commit is contained in:
parent
f9684d662d
commit
5be2624cb1
@ -1705,8 +1705,15 @@ void Bittorrent::addConsoleMessage(QString msg, QString) {
|
|||||||
for(torrentIT = torrents.begin(); torrentIT != torrents.end(); torrentIT++) {
|
for(torrentIT = torrents.begin(); torrentIT != torrents.end(); torrentIT++) {
|
||||||
QTorrentHandle h = QTorrentHandle(*torrentIT);
|
QTorrentHandle h = QTorrentHandle(*torrentIT);
|
||||||
if(!h.is_valid()) continue;
|
if(!h.is_valid()) continue;
|
||||||
if(!h.is_seed())
|
if(!h.is_seed()) {
|
||||||
h.move_storage(temppath);
|
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;
|
defaultTempPath = temppath;
|
||||||
@ -2157,7 +2164,8 @@ void Bittorrent::addConsoleMessage(QString msg, QString) {
|
|||||||
appendqBextensionToTorrent(h, true);
|
appendqBextensionToTorrent(h, true);
|
||||||
#endif
|
#endif
|
||||||
// Truncate root folder
|
// Truncate root folder
|
||||||
misc::truncateRootFolder(p->handle);
|
QString root_folder = misc::truncateRootFolder(p->handle);
|
||||||
|
TorrentPersistentData::setRootFolder(h.hash(), root_folder);
|
||||||
emit metadataReceived(h);
|
emit metadataReceived(h);
|
||||||
if(h.is_paused()) {
|
if(h.is_paused()) {
|
||||||
// XXX: Unfortunately libtorrent-rasterbar does not send a torrent_paused_alert
|
// XXX: Unfortunately libtorrent-rasterbar does not send a torrent_paused_alert
|
||||||
|
Loading…
x
Reference in New Issue
Block a user