From: Laurent Barbe Date: Sun, 13 Dec 2015 21:31:42 +0000 (+0100) Subject: Fix mkdir error if it already exist X-Git-Tag: lxc-2.0.0.beta1~11^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F670%2Fhead;p=thirdparty%2Flxc.git Fix mkdir error if it already exist Signed-off-by: Laurent Barbe --- 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; }