From 45c357dfe272acf1f236990b3fb7107561a36e57 Mon Sep 17 00:00:00 2001 From: Chocobo1 Date: Sat, 15 Feb 2020 02:43:34 +0800 Subject: [PATCH] Include resume folder path in exception message The message in RuntimeError exception will be displayed to the users and users would be clueless if we don't show the path. --- src/base/bittorrent/session.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/base/bittorrent/session.cpp b/src/base/bittorrent/session.cpp index 0ce5a23bd..f1db4eb92 100644 --- a/src/base/bittorrent/session.cpp +++ b/src/base/bittorrent/session.cpp @@ -3961,11 +3961,13 @@ void Session::initResumeFolder() if (resumeFolderDir.exists() || resumeFolderDir.mkpath(resumeFolderDir.absolutePath())) { m_resumeFolderLock->setFileName(resumeFolderDir.absoluteFilePath("session.lock")); if (!m_resumeFolderLock->open(QFile::WriteOnly)) { - throw RuntimeError {tr("Cannot write to torrent resume folder.")}; + throw RuntimeError {tr("Cannot write to torrent resume folder: \"%1\"") + .arg(Utils::Fs::toNativePath(m_resumeFolderPath))}; } } else { - throw RuntimeError {tr("Cannot create torrent resume folder.")}; + throw RuntimeError {tr("Cannot create torrent resume folder: \"%1\"") + .arg(Utils::Fs::toNativePath(m_resumeFolderPath))}; } }