From: Tanu Kaskinen Date: Sat, 3 May 2014 08:52:12 +0000 (+0300) Subject: path-util: add path_make_relative() X-Git-Tag: v213~124 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=7cb9c51ce81818c200f27de4db4a4076cbe4265b;hp=7cb9c51ce81818c200f27de4db4a4076cbe4265b;p=elogind.git path-util: add path_make_relative() In user_dirs() in path-lookup.c, I want to replace this: symlink("../../../.config/systemd/user", data_home); with symlink(config_home, data_home); to avoid hardcoding .config when XDG_CONFIG_HOME is set. The problem is that config_home is an absolute path, and it's better to make the symlink relative. path_make_relative() is an utility function that converts an absolute path into a relative one. ---