]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
Fix mkdir error if it already exist 670/head
authorLaurent Barbe <laurent@ksperis.com>
Sun, 13 Dec 2015 21:31:42 +0000 (22:31 +0100)
committerLaurent Barbe <laurent@ksperis.com>
Sun, 13 Dec 2015 21:35:43 +0000 (22:35 +0100)
Signed-off-by: Laurent Barbe <laurent@ksperis.com>
src/lxc/bdev.c

index a1e7d83a4b1c3ec30726d12fc9fbb949a6b37536..ae06caef0aa23726bd717571e1201116b980982a 100644 (file)
@@ -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;
        }