From 43b1e5cb1f53f60d0bce4469fb925d80d5e8c541 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20M=C3=BCller?= Date: Sun, 7 Jan 2024 12:01:54 +0100 Subject: [PATCH] Improve warning popup message when saving settings fails The message was previously showing an incorrect filename. --- src/engine/client/client.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/engine/client/client.cpp b/src/engine/client/client.cpp index fa88b1ae4..8d9b3d841 100644 --- a/src/engine/client/client.cpp +++ b/src/engine/client/client.cpp @@ -2997,7 +2997,11 @@ void CClient::Run() { // write down the config and quit if(!m_pConfigManager->Save()) - m_vWarnings.emplace_back(Localize("Saving ddnet-settings.cfg failed")); + { + char aWarning[128]; + str_format(aWarning, sizeof(aWarning), Localize("Saving settings to '%s' failed"), CONFIG_FILE); + m_vWarnings.emplace_back(aWarning); + } s_SavedConfig = true; }