Merge pull request #13151 from glassez/move-storage

Improve "move torrent storage" handling
This commit is contained in:
Vladimir Golovnev
2020-07-20 21:27:27 +03:00
committed by GitHub
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()