From 7f6240fab157fe0374ecd6efbee5b8495cc95b5f Mon Sep 17 00:00:00 2001 From: Franck Bui Date: Mon, 16 Jul 2018 17:57:41 +0200 Subject: [PATCH] path-util: make use of path_join() in path_make_absolute_cwd() --- src/basic/path-util.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/basic/path-util.c b/src/basic/path-util.c index d214c729160..b62786f27e6 100644 --- a/src/basic/path-util.c +++ b/src/basic/path-util.c @@ -110,10 +110,7 @@ int path_make_absolute_cwd(const char *p, char **ret) { if (r < 0) return r; - if (endswith(cwd, "/")) - c = strjoin(cwd, p); - else - c = strjoin(cwd, "/", p); + c = path_join(NULL, cwd, p); } if (!c) return -ENOMEM; -- 2.47.3