From 17f22530a5fdee33e1669a7b97d58d5a869dce26 Mon Sep 17 00:00:00 2001 From: Timo Teräs Date: Mon, 21 Feb 2022 12:01:37 +0200 Subject: fs_fsys: ignore mkdir EEXIST Be happy if the directory already exists. --- src/fs_fsys.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/fs_fsys.c b/src/fs_fsys.c index 2c43607..42c8a4c 100644 --- a/src/fs_fsys.c +++ b/src/fs_fsys.c @@ -17,7 +17,8 @@ static int fsys_dir_create(struct apk_fsdir *d, mode_t mode) { - if (mkdirat(apk_ctx_fd_dest(d->ac), apk_pathbuilder_cstr(&d->pb), mode) < 0) + if (mkdirat(apk_ctx_fd_dest(d->ac), apk_pathbuilder_cstr(&d->pb), mode) < 0 && + errno != EEXIST) return -errno; return 0; } -- cgit v1.2.3-70-g09d2