diff options
author | Joris Vink <joris@cvs.openbsd.org> | 2005-05-12 23:35:43 +0000 |
---|---|---|
committer | Joris Vink <joris@cvs.openbsd.org> | 2005-05-12 23:35:43 +0000 |
commit | 9e4dcccbf2f12745e41f9a3bae2333bb0b9ad1a8 (patch) | |
tree | b816f23dde962b6b6e927bef0b00eae300543a47 /usr.bin/cvs/file.c | |
parent | bc23ea8f24a2883297a2697900d186de7ee4ddfd (diff) |
introduce a new flag to the file api: CF_NOFILES, which allows us
to only load directories and skip regular files.
tested and ok xsa@
Diffstat (limited to 'usr.bin/cvs/file.c')
-rw-r--r-- | usr.bin/cvs/file.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/usr.bin/cvs/file.c b/usr.bin/cvs/file.c index 5032c5cccae..30415dad184 100644 --- a/usr.bin/cvs/file.c +++ b/usr.bin/cvs/file.c @@ -1,4 +1,4 @@ -/* $OpenBSD: file.c,v 1.69 2005/05/01 23:21:39 joris Exp $ */ +/* $OpenBSD: file.c,v 1.70 2005/05/12 23:35:42 joris Exp $ */ /* * Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org> * All rights reserved. @@ -654,6 +654,9 @@ cvs_file_getdir(CVSFILE *cf, int flags, char *path) continue; } + if ((ent->d_type != DT_DIR) && (flags & CF_NOFILES)) + continue; + if (path != NULL) { if (strcmp(path, ent->d_name)) continue; |