The branch stable/13 has been updated by kib:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=19d960cedddd08b59fe193190744a36602e7e8d5

commit 19d960cedddd08b59fe193190744a36602e7e8d5
Author:     Ricardo Branco <[email protected]>
AuthorDate: 2024-01-29 22:17:47 +0000
Commit:     Konstantin Belousov <[email protected]>
CommitDate: 2024-02-06 00:38:34 +0000

    chflags(1): Fix -f option
    
    PR:     276723
    
    (cherry picked from commit fae467c2212ced8e82f5fa385d316445c8874941)
---
 bin/chflags/chflags.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/bin/chflags/chflags.c b/bin/chflags/chflags.c
index 2532b4e230ef..81fb6708ae34 100644
--- a/bin/chflags/chflags.c
+++ b/bin/chflags/chflags.c
@@ -195,9 +195,11 @@ main(int argc, char *argv[])
                if (newflags == p->fts_statp->st_flags)
                        continue;
                if (chflagsat(AT_FDCWD, p->fts_accpath, newflags,
-                   atflag) == -1 && !fflag) {
-                       warn("%s", p->fts_path);
-                       rval = 1;
+                   atflag) == -1) {
+                       if (!fflag) {
+                               warn("%s", p->fts_path);
+                               rval = 1;
+                       }
                } else if (vflag || siginfo) {
                        (void)printf("%s", p->fts_path);
                        if (vflag > 1 || siginfo)

Reply via email to