Improve "move torrent storage" handling

This commit is contained in:
Vladimir Golovnev (Glassez) 2020-07-15 15:46:09 +03:00
parent 3cf8626317
commit cdc2b8d79b
No known key found for this signature in database
GPG key ID: 52A2C7DEE2DFA6F7
5 changed files with 67 additions and 40 deletions

View file

@ -332,13 +332,8 @@ void TransferListWidget::setSelectedTorrentsLocation()
if (newLocation.isEmpty() || !QDir(newLocation).exists()) return;
// Actually move storage
for (BitTorrent::TorrentHandle *const torrent : torrents) {
Logger::instance()->addMessage(tr("Set location: moving \"%1\", from \"%2\" to \"%3\""
, "Set location: moving \"ubuntu_16_04.iso\", from \"/home/dir1\" to \"/home/dir2\"")
.arg(torrent->name(), Utils::Fs::toNativePath(torrent->savePath())
, Utils::Fs::toNativePath(newLocation)));
for (BitTorrent::TorrentHandle *const torrent : torrents)
torrent->move(Utils::Fs::expandPathAbs(newLocation));
}
}
void TransferListWidget::pauseAllTorrents()