mirror of
https://github.com/systemd/systemd.git
synced 2024-11-07 09:56:51 +03:00
path-util: don't insert duplicate "/" in path_make_absolute_cwd()
When the working directory is "/" it's prettier not to insert a second "/" in the path, even though it is technically correct.
This commit is contained in:
parent
d72495759b
commit
7aeeb313ad
@ -127,6 +127,9 @@ 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);
|
||||
}
|
||||
if (!c)
|
||||
|
Loading…
Reference in New Issue
Block a user