From 93068560df71799d8bc3d3d87319bd10fd5a874c Mon Sep 17 00:00:00 2001 From: Laurent Barbe Date: Sun, 13 Dec 2015 22:31:42 +0100 Subject: [PATCH] Fix mkdir error if it already exist Signed-off-by: Laurent Barbe --- src/lxc/bdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lxc/bdev.c b/src/lxc/bdev.c index a1e7d83a4..ae06caef0 100644 --- a/src/lxc/bdev.c +++ b/src/lxc/bdev.c @@ -1323,7 +1323,7 @@ static int rbd_create(struct bdev *bdev, const char *dest, const char *n, if (!(bdev->dest = strdup(dest))) return -1; - if (mkdir_p(bdev->dest, 0755) < 0) { + if (mkdir_p(bdev->dest, 0755) < 0 && errno != EEXIST) { ERROR("Error creating %s", bdev->dest); return -1; } -- 2.47.2