Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.sbin/pkg_install/admin Handle symlinks to directories co...



details:   https://anonhg.NetBSD.org/src/rev/20aaec5aabb5
branches:  trunk
changeset: 476304:20aaec5aabb5
user:      hubertf <hubertf%NetBSD.org@localhost>
date:      Mon Sep 13 00:32:14 1999 +0000

description:
Handle symlinks to directories correctly in "check" and "rebuild".
Problem reported by Matthias "tron" Scheler in private mail.

diffstat:

 usr.sbin/pkg_install/admin/main.c |  8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diffs (32 lines):

diff -r 8fe742bb33f7 -r 20aaec5aabb5 usr.sbin/pkg_install/admin/main.c
--- a/usr.sbin/pkg_install/admin/main.c Sun Sep 12 19:55:41 1999 +0000
+++ b/usr.sbin/pkg_install/admin/main.c Mon Sep 13 00:32:14 1999 +0000
@@ -1,8 +1,8 @@
-/*     $NetBSD: main.c,v 1.7 1999/08/24 00:48:38 hubertf Exp $ */
+/*     $NetBSD: main.c,v 1.8 1999/09/13 00:32:14 hubertf Exp $ */
 
 #include <sys/cdefs.h>
 #ifndef lint
-__RCSID("$NetBSD: main.c,v 1.7 1999/08/24 00:48:38 hubertf Exp $");
+__RCSID("$NetBSD: main.c,v 1.8 1999/09/13 00:32:14 hubertf Exp $");
 #endif
 
 /*
@@ -87,7 +87,7 @@
                        
                        (void) snprintf(file, sizeof(file), "%s/%s", dirp, p->name);
 
-                       if (!isfile(file))
+                       if (!(isfile(file) || islinktodir(file)))
                                warnx("%s: File %s is in %s but not on filesystem!", PkgName, file, CONTENTS_FNAME);
                        else {
                                if (p->next &&
@@ -212,7 +212,7 @@
 
                                (void) snprintf(file, sizeof(file), "%s/%s", dirp, p->name);
 
-                               if (!isfile(file))
+                               if (!(isfile(file) || islinktodir(file)))
                                        warnx("%s: File %s is in %s but not on filesystem!",
                                            PkgName, file, CONTENTS_FNAME);
                                else {



Home | Main Index | Thread Index | Old Index