From fcb0f59fd0a6614b169a73c93516654e58e539a7 Mon Sep 17 00:00:00 2001 From: Tristan Matthews <tristan.matthews@savoirfairelinux.com> Date: Fri, 19 Oct 2012 16:02:25 -0400 Subject: [PATCH] * #16808: daemon: Fix configuration file path when XDG_CONFIG_HOME is set --- daemon/src/managerimpl.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/daemon/src/managerimpl.cpp b/daemon/src/managerimpl.cpp index 7d98db590a..3fea396299 100644 --- a/daemon/src/managerimpl.cpp +++ b/daemon/src/managerimpl.cpp @@ -1829,10 +1829,9 @@ std::string ManagerImpl::createConfigFile() const std::string configdir = std::string(HOMEDIR) + DIR_SEPARATOR_STR + ".config" + DIR_SEPARATOR_STR + PACKAGE; - std::string xdg_env(XDG_CONFIG_HOME); - if (not xdg_env.empty()) { - configdir = xdg_env; - } + const std::string xdg_env(XDG_CONFIG_HOME); + if (not xdg_env.empty()) + configdir = xdg_env + DIR_SEPARATOR_STR + PACKAGE; if (mkdir(configdir.data(), 0700) != 0) { // If directory creation failed -- GitLab