]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
systemctl-edit: Add missing ret_dropin_paths argument in retry path 18244/head
authorAnita Zhang <the.anitazha@gmail.com>
Thu, 14 Jan 2021 08:17:41 +0000 (00:17 -0800)
committerAnita Zhang <the.anitazha@gmail.com>
Thu, 14 Jan 2021 23:05:30 +0000 (15:05 -0800)
find_paths_to_edit() makes 2 calls to unit_find_paths(), one of which is
a retry client-side. ret_dropin_paths should be passed the same in
both cases.

src/systemctl/systemctl-edit.c

index a67318258e9037f0914560bf74da13ecec6c6e27..4186ec3aea76cd7822d2754c1a07c0d87344b9a5 100644 (file)
@@ -398,7 +398,7 @@ static int find_paths_to_edit(sd_bus *bus, char **names, char ***paths) {
                         /* If loading of the unit failed server side complete, then the server won't tell us
                          * the unit file path. In that case, find the file client side. */
                         log_debug_errno(r, "Unit '%s' was not loaded correctly, retrying client-side.", *name);
-                        r = unit_find_paths(bus, *name, &lp, true, &cached_name_map, &cached_id_map, &path, NULL);
+                        r = unit_find_paths(bus, *name, &lp, true, &cached_name_map, &cached_id_map, &path, &unit_paths);
                 }
                 if (r == -ERFKILL)
                         return log_error_errno(r, "Unit '%s' masked, cannot edit.", *name);