Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.bin/bzip2 On suggestion by Alistair Crooks use stat() in...
details: https://anonhg.NetBSD.org/src/rev/0684554627cd
branches: trunk
changeset: 471711:0684554627cd
user: tron <tron%NetBSD.org@localhost>
date: Thu Apr 08 18:34:27 1999 +0000
description:
On suggestion by Alistair Crooks use stat() instead of lstat() for "bzcat"
and "bzip -c -d" to check if a symlinks target is really a file.
diffstat:
usr.bin/bzip2/bzip2.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diffs (23 lines):
diff -r 8912b938c775 -r 0684554627cd usr.bin/bzip2/bzip2.c
--- a/usr.bin/bzip2/bzip2.c Thu Apr 08 18:21:15 1999 +0000
+++ b/usr.bin/bzip2/bzip2.c Thu Apr 08 18:34:27 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: bzip2.c,v 1.3 1999/04/07 17:58:49 tron Exp $ */
+/* $NetBSD: bzip2.c,v 1.4 1999/04/08 18:34:27 tron Exp $ */
/*-----------------------------------------------------------*/
/*--- A block-sorting, lossless compressor bzip2.c ---*/
@@ -772,10 +772,11 @@
IntNative i;
struct MY_STAT statBuf;
- i = MY_LSTAT ( name, &statBuf );
+ i = allowSymbolicLinks ? MY_STAT ( name, &statBuf ) :
+ MY_LSTAT ( name, &statBuf );
if (i != 0) return True;
if (MY_S_IFREG(statBuf.st_mode)) return False;
- if (allowSymbolicLinks && S_ISLNK(statBuf.st_mode)) return False;
+
return True;
}
Home |
Main Index |
Thread Index |
Old Index