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

_______________________________________________
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel

Reply via email to