diff options
author | Daniel Golle <daniel@makrotopia.org> | 2021-12-09 15:52:09 +0000 |
---|---|---|
committer | Timo Teräs <timo.teras@iki.fi> | 2021-12-23 08:07:42 +0000 |
commit | 4ccf038a9f79bf0cbe62a6fe24fde8601754e3c2 (patch) | |
tree | 585a719c9f29d3fe200588ac34035d32586ef927 /src/context.c | |
parent | af489f3b6fc67a843148008668febbfa80eb125e (diff) | |
download | apk-tools-4ccf038a9f79bf0cbe62a6fe24fde8601754e3c2.tar.gz apk-tools-4ccf038a9f79bf0cbe62a6fe24fde8601754e3c2.tar.bz2 apk-tools-4ccf038a9f79bf0cbe62a6fe24fde8601754e3c2.tar.xz apk-tools-4ccf038a9f79bf0cbe62a6fe24fde8601754e3c2.zip |
add option --no-logfile
Diffstat (limited to 'src/context.c')
-rw-r--r-- | src/context.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/context.c b/src/context.c index 7afb579..3a806db 100644 --- a/src/context.c +++ b/src/context.c @@ -69,7 +69,7 @@ int apk_ctx_prepare(struct apk_ctx *ac) } ac->dest_fd = ac->root_fd; - if (ac->open_flags & APK_OPENF_WRITE) { + if ((ac->open_flags & APK_OPENF_WRITE) && !(ac->flags & APK_NO_LOGFILE)) { const char *log_path = "var/log/apk.log"; const int lflags = O_WRONLY | O_APPEND | O_CREAT | O_CLOEXEC; int fd = openat(ac->root_fd, log_path, lflags, 0644); |