[systemd-devel] [PATCH 2/2] path-lookup: don't hardcode .config

Tanu Kaskinen tanu.kaskinen at linux.intel.com
Fri Apr 11 22:37:39 PDT 2014


If XDG_CONFIG_HOME is set, then we should respect that.
---
 src/shared/path-lookup.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/shared/path-lookup.c b/src/shared/path-lookup.c
index 63af43c..a885b66 100644
--- a/src/shared/path-lookup.c
+++ b/src/shared/path-lookup.c
@@ -135,8 +135,12 @@ static char** user_dirs(
                  * then filter out this link, if it is actually is
                  * one. */
 
+                /* If home is non-NULL, then config_home must be
+                 * non-NULL as well. */
+                assert(config_home);
+
                 mkdir_parents_label(data_home, 0777);
-                (void) symlink("../../../.config/systemd/user", data_home);
+                (void) symlink(config_home, data_home);
         }
 
         e = getenv("XDG_DATA_DIRS");
-- 
1.8.3.1



More information about the systemd-devel mailing list