From: Christian Brauner Date: Mon, 7 Jan 2019 12:37:06 +0000 (+0100) Subject: lxccontainer: fix container copy X-Git-Tag: lxc-3.2.0~199^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3d7e738a6befb76c47ba2c5fcc46d8cfa447171f;p=thirdparty%2Flxc.git lxccontainer: fix container copy 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 --- diff --git a/src/lxc/lxccontainer.c b/src/lxc/lxccontainer.c index 1e5e6ad05..196c23e86 100644 --- a/src/lxc/lxccontainer.c +++ b/src/lxc/lxccontainer.c @@ -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])) {