]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
systemctl: do not prepend arg_root twice when catting units
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Thu, 2 Feb 2017 16:32:40 +0000 (11:32 -0500)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Thu, 2 Feb 2017 16:32:40 +0000 (11:32 -0500)
The paths in lookup_paths already contain the arg_root prefix.

Fixes #5190.

src/systemctl/systemctl.c

index 8f80559bafa389d5317474fef899911b56789664..313e47431b1d9bbef918c8fcff9275880cbf2d2e 100644 (file)
@@ -2484,7 +2484,7 @@ static int unit_file_find_path(LookupPaths *lp, const char *unit_name, char **un
                 _cleanup_free_ char *path = NULL, *lpath = NULL;
                 int r;
 
-                path = path_join(arg_root, *p, unit_name);
+                path = path_join(NULL, *p, unit_name);
                 if (!path)
                         return log_oom();