From 4856dc68fd96de840f86d972bf9f852f371fc9ea Mon Sep 17 00:00:00 2001 From: Alexandre Lision <alexandre.lision@savoirfairelinux.com> Date: Wed, 25 Feb 2015 12:13:58 -0500 Subject: [PATCH] config: specify different path for OSX Refs #67163 Change-Id: Icb7940d0176cc01ff1122ade6044e75f740505f5 Signed-off-by: Guillaume Roguez <guillaume.roguez@savoirfairelinux.com> --- daemon/src/fileutils.cpp | 4 ++++ daemon/src/managerimpl.cpp | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/daemon/src/fileutils.cpp b/daemon/src/fileutils.cpp index 1fb3bd43b6..b8653839dd 100644 --- a/daemon/src/fileutils.cpp +++ b/daemon/src/fileutils.cpp @@ -309,6 +309,10 @@ get_cache_dir() } else { #ifdef __ANDROID__ return get_home_dir() + DIR_SEPARATOR_STR + PACKAGE; +#elif __APPLE__ + return get_home_dir() + DIR_SEPARATOR_STR + + "Library" + DIR_SEPARATOR_STR + "Application Support" + + DIR_SEPARATOR_STR + PACKAGE; #else return get_home_dir() + DIR_SEPARATOR_STR + ".cache" + DIR_SEPARATOR_STR + PACKAGE; diff --git a/daemon/src/managerimpl.cpp b/daemon/src/managerimpl.cpp index d3b5aa17eb..71e0ddc1fd 100644 --- a/daemon/src/managerimpl.cpp +++ b/daemon/src/managerimpl.cpp @@ -1920,6 +1920,10 @@ ManagerImpl::retrieveConfigPath() const { #ifdef __ANDROID__ std::string configdir = "/data/data/cx.ring"; +#elif __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; -- GitLab