diff options
author | Timo Teräs <timo.teras@iki.fi> | 2022-02-21 12:01:37 +0200 |
---|---|---|
committer | Timo Teräs <timo.teras@iki.fi> | 2022-02-21 12:10:52 +0200 |
commit | 17f22530a5fdee33e1669a7b97d58d5a869dce26 (patch) | |
tree | 836ff1d53602046070e90388e8f1e4fb75b4ace3 /src/fs_fsys.c | |
parent | b576f0828443f2b729aefb8d2303ad75e9908c66 (diff) | |
download | apk-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/fs_fsys.c')
-rw-r--r-- | src/fs_fsys.c | 3 |
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; } |