summaryrefslogtreecommitdiff
path: root/usr.bin/cvs/file.c
diff options
context:
space:
mode:
authorJean-Francois Brousseau <jfb@cvs.openbsd.org>2004-08-06 20:12:16 +0000
committerJean-Francois Brousseau <jfb@cvs.openbsd.org>2004-08-06 20:12:16 +0000
commitf55ce1bff9dd0fb3974f7c99880a878a6b38350d (patch)
tree0f66f52233977a2669868819b23932b84068560a /usr.bin/cvs/file.c
parent62b349c7ec3ae59c0b2c2d08d8630711a5f2acc7 (diff)
* add a flag CF_NOSYMS to avoid loading information about symbolic links
and fix 2 calls to cvs_splitpath() * unbreak cvs_file_find()
Diffstat (limited to 'usr.bin/cvs/file.c')
-rw-r--r--usr.bin/cvs/file.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/usr.bin/cvs/file.c b/usr.bin/cvs/file.c
index fd34d086a57..9234343ebb0 100644
--- a/usr.bin/cvs/file.c
+++ b/usr.bin/cvs/file.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: file.c,v 1.23 2004/08/06 14:55:56 jfb Exp $ */
+/* $OpenBSD: file.c,v 1.24 2004/08/06 20:12:15 jfb Exp $ */
/*
* Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org>
* All rights reserved.
@@ -321,7 +321,7 @@ cvs_file_find(CVSFILE *hier, const char *path)
do {
sp = strchr(pp, '/');
if (sp != NULL)
- *sp = '\0';
+ *(sp++) = '\0';
/* special case */
if (*pp == '.') {
@@ -349,7 +349,7 @@ cvs_file_find(CVSFILE *hier, const char *path)
pp = sp;
} while (sp != NULL);
- return (NULL);
+ return (cf);
}
@@ -457,6 +457,9 @@ cvs_file_getdir(CVSFILE *cf, int flags)
if ((flags & CF_IGNORE) && cvs_file_chkign(ent->d_name))
continue;
+ if ((flags & CF_NOSYMS) && (ent->d_type == DT_LNK))
+ continue;
+
snprintf(pbuf, sizeof(pbuf), "%s/%s",
cf->cf_path, ent->d_name);
cfp = cvs_file_lget(pbuf, flags, cf);