diff options
| author | hubertf <hubertf@NetBSD.org> | 1999-09-13 00:32:14 +0000 |
|---|---|---|
| committer | hubertf <hubertf@NetBSD.org> | 1999-09-13 00:32:14 +0000 |
| commit | 7ddf2760b9888a2ee1cfbafdbdfd90af53ab200d (patch) | |
| tree | 97b4765027c14ba2be69404b71cf66b67c97ba52 /usr.sbin/pkg_install/admin | |
| parent | 3a090247e420fabb7ffdd95cfd3564eb0938c693 (diff) | |
Handle symlinks to directories correctly in "check" and "rebuild".
Problem reported by Matthias "tron" Scheler in private mail.
Diffstat (limited to 'usr.sbin/pkg_install/admin')
| -rw-r--r-- | usr.sbin/pkg_install/admin/main.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/usr.sbin/pkg_install/admin/main.c b/usr.sbin/pkg_install/admin/main.c index 959c7af5c98..df203567c25 100644 --- a/usr.sbin/pkg_install/admin/main.c +++ b/usr.sbin/pkg_install/admin/main.c @@ -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 @@ check1pkg(const char *pkgdir) (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 @@ rebuild(void) (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 { |
