Skip to content
Snippets Groups Projects
Commit 070594d1 authored by Alexandre Lision's avatar Alexandre Lision Committed by gerrit2
Browse files

fileutils: fix config_path on OSX


Commit 5149e343 removed the return value of getconfig_dir() when
compiling for OSX.

Change-Id: I1d3729083adfb487f7b7cf2f0e8ee3a1a56e1192
Tested-by: default avatarAlexandre Lision <alexandre.lision@savoirfairelinux.com>
Reviewed-by: default avatarGuillaume Roguez <guillaume.roguez@savoirfairelinux.com>
parent face491b
Branches
No related tags found
No related merge requests found
...@@ -532,10 +532,6 @@ get_config_dir() ...@@ -532,10 +532,6 @@ get_config_dir()
config_path = paths[0]; config_path = paths[0];
return config_path; 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) #elif defined(RING_UWP)
std::vector<std::string> paths; std::vector<std::string> paths;
emitSignal<DRing::ConfigurationSignal::GetAppDataPath>("", &paths); emitSignal<DRing::ConfigurationSignal::GetAppDataPath>("", &paths);
...@@ -548,10 +544,15 @@ get_config_dir() ...@@ -548,10 +544,15 @@ get_config_dir()
RING_DBG("Cannot create directory: %s!", config_path.c_str()); RING_DBG("Cannot create directory: %s!", config_path.c_str());
} }
return config_path; 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 #else
std::string configdir = fileutils::get_home_dir() + DIR_SEPARATOR_STR + std::string configdir = fileutils::get_home_dir() + DIR_SEPARATOR_STR +
".config" + DIR_SEPARATOR_STR + PACKAGE; ".config" + DIR_SEPARATOR_STR + PACKAGE;
#endif
const std::string xdg_env(XDG_CONFIG_HOME); const std::string xdg_env(XDG_CONFIG_HOME);
if (not xdg_env.empty()) if (not xdg_env.empty())
configdir = xdg_env + DIR_SEPARATOR_STR + PACKAGE; configdir = xdg_env + DIR_SEPARATOR_STR + PACKAGE;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment