From 2d4c8e5945375d244a361c2f97f9370f8d88ac11 Mon Sep 17 00:00:00 2001 From: Martin Pool Date: Tue, 27 Nov 2001 07:07:36 +0000 Subject: The size of anything but a regular file is probably not worth thinking about. --- tls.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'tls.c') diff --git a/tls.c b/tls.c index 2deaabf3..cd6dec05 100644 --- a/tls.c +++ b/tls.c @@ -70,11 +70,14 @@ static void list_file (const char *fname) failed ("stat", fname); /* On some BSD platforms the mode bits of a symlink are - * undefined. The size of a link is also somewhat shaky. */ - if (S_ISLNK(buf.st_mode)) { + * undefined. */ + if (S_ISLNK(buf.st_mode)) buf.st_mode &= ~0777; + + /* The size of anything but a regular file is probably not + * worth thinking about. */ + if (!S_ISREG(buf.st_mode)) buf.st_size = 0; - } permstring(permbuf, buf.st_mode); -- cgit v1.2.3