]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
repart: Take --root into account in read only filesystems shortcut
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Sun, 2 Oct 2022 19:37:31 +0000 (21:37 +0200)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Sun, 2 Oct 2022 23:00:07 +0000 (08:00 +0900)
src/partition/repart.c

index 471537d6534db2793e15b0a6bdb6fb0caf35195e..7a24e8ffec8cbd8a9398a3ce3ca6d8c57bac3fa2 100644 (file)
@@ -3361,7 +3361,7 @@ static int partition_populate_directory(Partition *p, char **ret_root, char **re
         if (strv_length(p->copy_files) == 2 && strv_length(p->make_directories) == 0 && streq(p->copy_files[1], "/")) {
                 _cleanup_free_ char *s = NULL;
 
-                s = strdup(p->copy_files[0]);
+                s = path_join(arg_root, p->copy_files[0]);
                 if (!s)
                         return log_oom();