From 6435b09267aeae41ebb89fd1c1e4e5fa30fb169a Mon Sep 17 00:00:00 2001 From: Gavin Hayes Date: Tue, 9 Aug 2022 21:30:38 -0400 Subject: [PATCH] utimesat: stop zipos case from interfering with futimens operation --- libc/calls/utimensat.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/libc/calls/utimensat.c b/libc/calls/utimensat.c index c514a43ca..259ee98dd 100644 --- a/libc/calls/utimensat.c +++ b/libc/calls/utimensat.c @@ -62,8 +62,9 @@ int utimensat(int dirfd, const char *path, const struct timespec ts[2], rc = einval(); // unsupported flag } else if (!path && flags) { rc = einval(); // futimens() doesn't take flags - } else if (weaken(__zipos_notat) && (rc = __zipos_notat(dirfd, path)) == -1) { - STRACE("zipos mkdirat not supported yet"); + } else if ((path || __isfdkind(dirfd, kFdZip)) && weaken(__zipos_notat) && + (rc = __zipos_notat(dirfd, path)) == -1) { + STRACE("zipos utimensat not supported yet"); } else if (!IsWindows()) { rc = sys_utimensat(dirfd, path, ts, flags); } else {