diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 1998-02-13 16:36:25 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 1998-02-13 16:36:25 +0000 |
commit | ccb7f6d77981508a2f1071133b7eae8f68a16efd (patch) | |
tree | 17854089dec76e8bbfac1b5e3fe962e367e769bb /usr.bin | |
parent | e5cdec4dfad1fecde28f994182f4aa4e76f5f731 (diff) |
Don't do chflags() if st_flags is zero. Fixes bogus error when
uncompressing on an NFS filesystem. Noted by hubertf@channel.regensburg.org
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/compress/main.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/compress/main.c b/usr.bin/compress/main.c index f293dbebf85..49ff1e263d3 100644 --- a/usr.bin/compress/main.c +++ b/usr.bin/compress/main.c @@ -1,4 +1,4 @@ -/* $OpenBSD: main.c,v 1.7 1997/08/19 06:32:36 denny Exp $ */ +/* $OpenBSD: main.c,v 1.8 1998/02/13 16:36:24 millert Exp $ */ /*- * Copyright (c) 1992, 1993 @@ -41,7 +41,7 @@ static char copyright[] = #if 0 static char sccsid[] = "@(#)compress.c 8.2 (Berkeley) 1/7/94"; #else -static char rcsid[] = "$OpenBSD: main.c,v 1.7 1997/08/19 06:32:36 denny Exp $"; +static char rcsid[] = "$OpenBSD: main.c,v 1.8 1998/02/13 16:36:24 millert Exp $"; #endif #endif /* not lint */ @@ -489,7 +489,7 @@ setfile(name, fs) if (chmod(name, fs->st_mode)) warn("chown: %s", name); - if (chflags(name, fs->st_flags)) + if (fs->st_flags && chflags(name, fs->st_flags)) warn("chflags: %s", name); } |