From 070594d12be486e0bcd94255113818b69fe85ad7 Mon Sep 17 00:00:00 2001 From: Alexandre Lision <alexandre.lision@savoirfairelinux.com> Date: Thu, 12 Jan 2017 14:01:07 -0500 Subject: [PATCH] fileutils: fix config_path on OSX Commit 5149e343b removed the return value of getconfig_dir() when compiling for OSX. Change-Id: I1d3729083adfb487f7b7cf2f0e8ee3a1a56e1192 Tested-by: Alexandre Lision <alexandre.lision@savoirfairelinux.com> Reviewed-by: Guillaume Roguez <guillaume.roguez@savoirfairelinux.com> --- src/fileutils.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/fileutils.cpp b/src/fileutils.cpp index 66422f63e9..5148f7c708 100644 --- a/src/fileutils.cpp +++ b/src/fileutils.cpp @@ -532,10 +532,6 @@ get_config_dir() config_path = paths[0]; return config_path; -#elif defined( __APPLE__ ) - std::string configdir = fileutils::get_home_dir() + DIR_SEPARATOR_STR - + "Library" + DIR_SEPARATOR_STR + "Application Support" - + DIR_SEPARATOR_STR + PACKAGE; #elif defined(RING_UWP) std::vector<std::string> paths; emitSignal<DRing::ConfigurationSignal::GetAppDataPath>("", &paths); @@ -548,10 +544,15 @@ get_config_dir() RING_DBG("Cannot create directory: %s!", config_path.c_str()); } return config_path; +#else +#if defined(__APPLE__) + std::string configdir = fileutils::get_home_dir() + DIR_SEPARATOR_STR + + "Library" + DIR_SEPARATOR_STR + "Application Support" + + DIR_SEPARATOR_STR + PACKAGE; #else std::string configdir = fileutils::get_home_dir() + DIR_SEPARATOR_STR + ".config" + DIR_SEPARATOR_STR + PACKAGE; - +#endif const std::string xdg_env(XDG_CONFIG_HOME); if (not xdg_env.empty()) configdir = xdg_env + DIR_SEPARATOR_STR + PACKAGE; -- GitLab