Browse Source

Merge pull request #8773 from Chocobo1/log

Fix path separator in log messages
adaptive-webui-19844
Mike Tzou 7 years ago committed by GitHub
parent
commit
beef041e71
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      src/gui/transferlistwidget.cpp
  2. 2
      src/webui/api/torrentscontroller.cpp

3
src/gui/transferlistwidget.cpp

@ -400,7 +400,8 @@ void TransferListWidget::setSelectedTorrentsLocation()
foreach (BitTorrent::TorrentHandle *const torrent, torrents) { foreach (BitTorrent::TorrentHandle *const torrent, torrents) {
Logger::instance()->addMessage(tr("Set location: moving \"%1\", from \"%2\" to \"%3\"" 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\"") , "Set location: moving \"ubuntu_16_04.iso\", from \"/home/dir1\" to \"/home/dir2\"")
.arg(torrent->name(), torrent->savePath(), newLocation)); .arg(torrent->name(), Utils::Fs::toNativePath(torrent->savePath())
, Utils::Fs::toNativePath(newLocation)));
torrent->move(Utils::Fs::expandPathAbs(newLocation)); torrent->move(Utils::Fs::expandPathAbs(newLocation));
} }
} }

2
src/webui/api/torrentscontroller.cpp

@ -742,7 +742,7 @@ void TorrentsController::setLocationAction()
applyToTorrents(hashes, [newLocation](BitTorrent::TorrentHandle *torrent) applyToTorrents(hashes, [newLocation](BitTorrent::TorrentHandle *torrent)
{ {
LogMsg(tr("WebUI Set location: moving \"%1\", from \"%2\" to \"%3\"") LogMsg(tr("WebUI Set location: moving \"%1\", from \"%2\" to \"%3\"")
.arg(torrent->name(), torrent->savePath(), newLocation)); .arg(torrent->name(), Utils::Fs::toNativePath(torrent->savePath()), Utils::Fs::toNativePath(newLocation)));
torrent->move(Utils::Fs::expandPathAbs(newLocation)); torrent->move(Utils::Fs::expandPathAbs(newLocation));
}); });
} }

Loading…
Cancel
Save