summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike Yuan <me@yhndnzj.com>2024-07-22 22:17:24 +0200
committerMike Yuan <me@yhndnzj.com>2024-07-23 18:48:15 +0200
commit0e7eda91f4bacc3a84733d392f7954b1950c793c (patch)
tree9e77e68b2cc0d0ad225a620c2a7f2612b2ddbff7
parentpath-util: trivial cleanup for find_executable_full() (diff)
downloadsystemd-0e7eda91f4bacc3a84733d392f7954b1950c793c.tar.xz
systemd-0e7eda91f4bacc3a84733d392f7954b1950c793c.zip
path-util: simplify final path for find_executable()
Currently, systemd-run ./test.sh would set Description= to $PWD/./test.sh. This is quite ugly.
-rw-r--r--src/basic/path-util.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/basic/path-util.c b/src/basic/path-util.c
index 0b4d7b6cf7..78ba10ed80 100644
--- a/src/basic/path-util.c
+++ b/src/basic/path-util.c
@@ -669,6 +669,8 @@ static int find_executable_impl(const char *name, const char *root, char **ret_f
r = path_make_absolute_cwd(name, ret_filename);
if (r < 0)
return r;
+
+ path_simplify(*ret_filename);
}
if (ret_fd)