Merge pull request #12035 from glassez/move-storage

Move torrent storages one by one
This commit is contained in:
Vladimir Golovnev 2020-03-13 15:59:05 +03:00 committed by GitHub
commit 5127156ba4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 217 additions and 166 deletions

View file

@ -507,12 +507,9 @@ void TransferListWidget::setSelectedTorrentsLocation()
if (torrents.isEmpty()) return;
const QString oldLocation = torrents[0]->savePath();
qDebug("Old location is %s", qUtf8Printable(oldLocation));
const QString newLocation = QFileDialog::getExistingDirectory(this, tr("Choose save path"), oldLocation,
QFileDialog::DontConfirmOverwrite | QFileDialog::ShowDirsOnly | QFileDialog::HideNameFilterDetails);
if (newLocation.isEmpty() || !QDir(newLocation).exists()) return;
qDebug("New location is %s", qUtf8Printable(newLocation));
// Actually move storage
for (BitTorrent::TorrentHandle *const torrent : torrents) {