From 0a3350f63148d08c6b5fb14d82196738fc413da9 Mon Sep 17 00:00:00 2001 From: Rob Landley Date: Wed, 18 Mar 2020 02:20:52 -0500 Subject: Fix WARN_ONLY (and the one caller feeding it in the field it was checking). --- toys/posix/tar.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'toys/posix/tar.c') diff --git a/toys/posix/tar.c b/toys/posix/tar.c index 87e88f65..16e4e49c 100644 --- a/toys/posix/tar.c +++ b/toys/posix/tar.c @@ -495,8 +495,9 @@ static void extract_to_disk(void) return perror_msg("can't link '%s' -> '%s'", name, TT.hdr.link_target); // write contents } else { - int fd = xcreate(name, O_WRONLY|O_CREAT|(FLAG(overwrite)?O_TRUNC:O_EXCL), - WARN_ONLY|(ala & 07777)); + int fd = xcreate(name, + WARN_ONLY|O_WRONLY|O_CREAT|(FLAG(overwrite)?O_TRUNC:O_EXCL), + ala & 07777); if (fd != -1) sendfile_sparse(fd); else skippy(TT.hdr.size); } -- cgit v1.2.3