summaryrefslogtreecommitdiff
path: root/src/context.c
diff options
context:
space:
mode:
authorTimo Teräs <timo.teras@iki.fi>2022-04-05 10:53:52 +0300
committerTimo Teräs <timo.teras@iki.fi>2022-04-05 10:53:52 +0300
commit191e2d412dfdfd5ac0c49be3752494e0708fa060 (patch)
tree797350f80cd05aff2c906ef2611909b6c6ff9c8a /src/context.c
parent232067b3d1399d97b5058440bd8282031053fa7c (diff)
downloadapk-tools-191e2d412dfdfd5ac0c49be3752494e0708fa060.tar.gz
apk-tools-191e2d412dfdfd5ac0c49be3752494e0708fa060.tar.bz2
apk-tools-191e2d412dfdfd5ac0c49be3752494e0708fa060.tar.xz
apk-tools-191e2d412dfdfd5ac0c49be3752494e0708fa060.zip
io: move make_dirs as apk_make_dirs and use it
Diffstat (limited to 'src/context.c')
-rw-r--r--src/context.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/context.c b/src/context.c
index 400e09b..38b8d18 100644
--- a/src/context.c
+++ b/src/context.c
@@ -74,8 +74,7 @@ int apk_ctx_prepare(struct apk_ctx *ac)
const int lflags = O_WRONLY | O_APPEND | O_CREAT | O_CLOEXEC;
int fd = openat(ac->root_fd, log_path, lflags, 0644);
if (fd < 0 && (ac->open_flags & APK_OPENF_CREATE)) {
- mkdirat(ac->root_fd, "var", 0755);
- mkdirat(ac->root_fd, "var/log", 0755);
+ apk_make_dirs(ac->root_fd, "var/log", 0755, 0755);
fd = openat(ac->root_fd, log_path, lflags, 0644);
}
if (fd < 0) {