Skip to content

Commit

Permalink
Fix mkdir error if it already exist
Browse files Browse the repository at this point in the history
Signed-off-by: Laurent Barbe <laurent@ksperis.com>
  • Loading branch information
ksperis committed Dec 13, 2015
1 parent 7ed52ec commit 9306856
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lxc/bdev.c
Expand Up @@ -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;
}
Expand Down

0 comments on commit 9306856

Please sign in to comment.