From 941a06e107ab90f3b84c856723c1c6334eb883ec Mon Sep 17 00:00:00 2001 From: David Szabo Date: Mon, 26 Feb 2018 05:22:41 +0100 Subject: [PATCH] Custom image file path corrected (#3119) --- cockatrice/src/settingscache.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/cockatrice/src/settingscache.cpp b/cockatrice/src/settingscache.cpp index 46bca3e5..65fc3a53 100644 --- a/cockatrice/src/settingscache.cpp +++ b/cockatrice/src/settingscache.cpp @@ -11,7 +11,7 @@ QString SettingsCache::getDataPath() { if (isPortableBuild) - return qApp->applicationDirPath() + "/data/"; + return qApp->applicationDirPath() + "/data"; else return QStandardPaths::writableLocation(QStandardPaths::DataLocation); } @@ -183,7 +183,11 @@ SettingsCache::SettingsCache() replaysPath = getSafeConfigPath("paths/replays", dataPath + "/replays/"); picsPath = getSafeConfigPath("paths/pics", dataPath + "/pics/"); // this has never been exposed as an user-configurable setting - customPicsPath = getSafeConfigPath("paths/custompics", picsPath + "/CUSTOM/"); + if (picsPath.endsWith("/")) { + customPicsPath = getSafeConfigPath("paths/custompics", picsPath + "CUSTOM/"); + } else { + customPicsPath = getSafeConfigPath("paths/custompics", picsPath + "/CUSTOM/"); + } // this has never been exposed as an user-configurable setting customCardDatabasePath = getSafeConfigPath("paths/customsets", dataPath + "/customsets/");