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 <christian.brauner@ubuntu.com>
This commit is contained in:
Christian Brauner 2019-01-07 13:37:06 +01:00
parent de60a7fe1c
commit 3d7e738a6b
No known key found for this signature in database
GPG Key ID: 7B3C391EFEA93624

View 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])) {