From 8b575484e67b32994aa80ce4a7e7b20382f17597 Mon Sep 17 00:00:00 2001 From: Chocobo1 Date: Mon, 23 Apr 2018 17:42:42 +0800 Subject: [PATCH] Fix path separator in log messages --- src/gui/transferlistwidget.cpp | 3 ++- src/webui/api/torrentscontroller.cpp | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/gui/transferlistwidget.cpp b/src/gui/transferlistwidget.cpp index 4fd07a250..1d9062b00 100644 --- a/src/gui/transferlistwidget.cpp +++ b/src/gui/transferlistwidget.cpp @@ -400,7 +400,8 @@ void TransferListWidget::setSelectedTorrentsLocation() foreach (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(), torrent->savePath(), newLocation)); + .arg(torrent->name(), Utils::Fs::toNativePath(torrent->savePath()) + , Utils::Fs::toNativePath(newLocation))); torrent->move(Utils::Fs::expandPathAbs(newLocation)); } } diff --git a/src/webui/api/torrentscontroller.cpp b/src/webui/api/torrentscontroller.cpp index c8b6813d3..e4bd35d78 100644 --- a/src/webui/api/torrentscontroller.cpp +++ b/src/webui/api/torrentscontroller.cpp @@ -742,7 +742,7 @@ void TorrentsController::setLocationAction() applyToTorrents(hashes, [newLocation](BitTorrent::TorrentHandle *torrent) { 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)); }); }