From 4361081eecd8e19ec76de5bf946fc8d45e40ef77 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adrien=20B=C3=A9raud?= <adrien.beraud@savoirfairelinux.com> Date: Wed, 18 Mar 2015 11:13:07 -0400 Subject: [PATCH] osx: use official system data dir Refs #67163 Change-Id: I0893e34cca8fbbab0cf011f3f698c16dcb559fc0 --- daemon/src/fileutils.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/daemon/src/fileutils.cpp b/daemon/src/fileutils.cpp index 72201c188d..b96bb745d4 100644 --- a/daemon/src/fileutils.cpp +++ b/daemon/src/fileutils.cpp @@ -311,7 +311,7 @@ get_cache_dir() return get_home_dir() + DIR_SEPARATOR_STR + PACKAGE; #elif __APPLE__ return get_home_dir() + DIR_SEPARATOR_STR - + "Library" + DIR_SEPARATOR_STR + "Application Support" + + "Library" + DIR_SEPARATOR_STR + "Caches" + DIR_SEPARATOR_STR + PACKAGE; #else return get_home_dir() + DIR_SEPARATOR_STR + @@ -350,7 +350,11 @@ get_data_dir() { #ifdef __ANDROID__ return get_program_dir(); -#endif +#elif __APPLE__ + return get_home_dir() + DIR_SEPARATOR_STR + + "Library" + DIR_SEPARATOR_STR + "Application Support" + + DIR_SEPARATOR_STR + PACKAGE; +#else const std::string data_home(XDG_DATA_HOME); if (not data_home.empty()) return data_home + DIR_SEPARATOR_STR + PACKAGE; @@ -358,6 +362,7 @@ get_data_dir() // $HOME/.local/share should be used." return get_home_dir() + DIR_SEPARATOR_STR ".local" DIR_SEPARATOR_STR "share" DIR_SEPARATOR_STR + PACKAGE; +#endif } }} // namespace ring::fileutils -- GitLab