path-util: make use of path_join() in path_make_absolute_cwd()
This commit is contained in:
parent
9f36a8fb38
commit
7f6240fab1
|
@ -110,10 +110,7 @@ int path_make_absolute_cwd(const char *p, char **ret) {
|
||||||
if (r < 0)
|
if (r < 0)
|
||||||
return r;
|
return r;
|
||||||
|
|
||||||
if (endswith(cwd, "/"))
|
c = path_join(NULL, cwd, p);
|
||||||
c = strjoin(cwd, p);
|
|
||||||
else
|
|
||||||
c = strjoin(cwd, "/", p);
|
|
||||||
}
|
}
|
||||||
if (!c)
|
if (!c)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
|
Loading…
Reference in a new issue