summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTimo Teräs <timo.teras@iki.fi>2022-02-21 12:01:37 +0200
committerTimo Teräs <timo.teras@iki.fi>2022-02-21 12:10:52 +0200
commit17f22530a5fdee33e1669a7b97d58d5a869dce26 (patch)
tree836ff1d53602046070e90388e8f1e4fb75b4ace3 /src
parentb576f0828443f2b729aefb8d2303ad75e9908c66 (diff)
downloadapk-tools-17f22530a5fdee33e1669a7b97d58d5a869dce26.tar.gz
apk-tools-17f22530a5fdee33e1669a7b97d58d5a869dce26.tar.bz2
apk-tools-17f22530a5fdee33e1669a7b97d58d5a869dce26.tar.xz
apk-tools-17f22530a5fdee33e1669a7b97d58d5a869dce26.zip
fs_fsys: ignore mkdir EEXIST
Be happy if the directory already exists.
Diffstat (limited to 'src')
-rw-r--r--src/fs_fsys.c3
1 files changed, 2 insertions, 1 deletions
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;
}