]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
lxccontainer: fix container copy 2770/head
authorChristian Brauner <christian.brauner@ubuntu.com>
Mon, 7 Jan 2019 12:37:06 +0000 (13:37 +0100)
committerChristian Brauner <christian.brauner@ubuntu.com>
Mon, 7 Jan 2019 12:37:06 +0000 (13:37 +0100)
We need to strip the prefix from the container's source path before
trying to update the file.

Closes #2380.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
src/lxc/lxccontainer.c

index 1e5e6ad05aa5cdcb9e0915c4ddbefc339dde7a14..196c23e861961897fcdc42700aeb00fca44581dc 100644 (file)
@@ -3691,7 +3691,7 @@ static int clone_update_rootfs(struct clone_update_data *data)
                }
        } else { /* TODO come up with a better way */
                free(bdev->dest);
-               bdev->dest = strdup(bdev->src);
+               bdev->dest = strdup(lxc_storage_get_path(bdev->src, bdev->type));
        }
 
        if (!lxc_list_empty(&conf->hooks[LXCHOOK_CLONE])) {