diff options
-rw-r--r-- | usr.bin/cvs/file.c | 5 | ||||
-rw-r--r-- | usr.bin/cvs/file.h | 4 |
2 files changed, 6 insertions, 3 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; diff --git a/usr.bin/cvs/file.h b/usr.bin/cvs/file.h index a8ac1103db2..f26e4f73ca1 100644 --- a/usr.bin/cvs/file.h +++ b/usr.bin/cvs/file.h @@ -1,4 +1,4 @@ -/* $OpenBSD: file.h,v 1.17 2005/04/25 21:58:32 joris Exp $ */ +/* $OpenBSD: file.h,v 1.18 2005/05/12 23:35:42 joris Exp $ */ /* * Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org> * All rights reserved. @@ -49,7 +49,7 @@ struct cvs_entries; #define CF_CREATE 0x20 /* create if file does not exist */ #define CF_MKADMIN 0x40 /* create administrative files if they're missing */ #define CF_NOSYMS 0x80 /* ignore symbolic links */ - +#define CF_NOFILES 0x100 /* don't load any files inside a directory */ /* * The cvs_file structure is used to represent any file or directory within |