[lxc-devel] [lxc/master] lxccontainer: fix container copy
brauner on Github
lxc-bot at linuxcontainers.org
Mon Jan 7 12:41:23 UTC 2019
A non-text attachment was scrubbed...
Name: not available
Type: text/x-mailbox
Size: 480 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20190107/83c9db87/attachment.bin>
-------------- next part --------------
From 3d7e738a6befb76c47ba2c5fcc46d8cfa447171f Mon Sep 17 00:00:00 2001
From: Christian Brauner <christian.brauner at ubuntu.com>
Date: Mon, 7 Jan 2019 13:37:06 +0100
Subject: [PATCH] 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 at ubuntu.com>
---
src/lxc/lxccontainer.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/lxc/lxccontainer.c b/src/lxc/lxccontainer.c
index 1e5e6ad05a..196c23e861 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])) {
More information about the lxc-devel
mailing list