From f0e6cb196edaeddfe1ee8d84dfb346021e2ca3c5 Mon Sep 17 00:00:00 2001 From: Daan De Meyer Date: Sun, 2 Oct 2022 21:37:31 +0200 Subject: [PATCH] repart: Take --root into account in read only filesystems shortcut --- src/partition/repart.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/partition/repart.c b/src/partition/repart.c index 471537d6534..7a24e8ffec8 100644 --- a/src/partition/repart.c +++ b/src/partition/repart.c @@ -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(); -- 2.47.3