From d1e0f9dfc5a64ef123df0951facabddd33827c55 Mon Sep 17 00:00:00 2001 From: RickyRister <42636155+RickyRister@users.noreply.github.com> Date: Sat, 19 Oct 2024 17:18:35 -0700 Subject: [PATCH] fix bug (#5133) --- cockatrice/src/settingscache.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/cockatrice/src/settingscache.cpp b/cockatrice/src/settingscache.cpp index b105fca8b..d3185c853 100644 --- a/cockatrice/src/settingscache.cpp +++ b/cockatrice/src/settingscache.cpp @@ -412,7 +412,11 @@ void SettingsCache::setPicsPath(const QString &_picsPath) picsPath = _picsPath; settings->setValue("paths/pics", picsPath); // get a new value for customPicsPath, currently derived from picsPath - customPicsPath = getSafeConfigPath("paths/custompics", picsPath + "CUSTOM/"); + if (picsPath.endsWith("/")) { + customPicsPath = getSafeConfigPath("paths/custompics", picsPath + "CUSTOM/"); + } else { + customPicsPath = getSafeConfigPath("paths/custompics", picsPath + "/CUSTOM/"); + } emit picsPathChanged(); }