systemctl: refuse to edit runtime dropins when they already exist in /etc
The check for existing unit files and dropins is unified. path_join() is updated to not insert duplicate separators.
This commit is contained in:
parent
ad2a035820
commit
bc854dc7cd
3 changed files with 41 additions and 108 deletions
|
@ -176,13 +176,13 @@ static void test_path_join(void) {
|
|||
test_join("/root", "/a/b", "/c", "/root/a/b/c");
|
||||
test_join("/root", "a/b", "c", "/root/a/b/c");
|
||||
test_join("/root", "/a/b", "c", "/root/a/b/c");
|
||||
test_join("/root", "/", "c", "/root//c");
|
||||
test_join("/root", "/", "c", "/root/c");
|
||||
test_join("/root", "/", NULL, "/root/");
|
||||
|
||||
test_join(NULL, "/a/b", "/c", "/a/b/c");
|
||||
test_join(NULL, "a/b", "c", "a/b/c");
|
||||
test_join(NULL, "/a/b", "c", "/a/b/c");
|
||||
test_join(NULL, "/", "c", "//c");
|
||||
test_join(NULL, "/", "c", "/c");
|
||||
test_join(NULL, "/", NULL, "/");
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue