summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean-Francois Brousseau <jfb@cvs.openbsd.org>2004-08-27 14:00:30 +0000
committerJean-Francois Brousseau <jfb@cvs.openbsd.org>2004-08-27 14:00:30 +0000
commite91d817909461c76aad79c1b5df3d76ff8a52422 (patch)
treee84c96634230b8c8422f015dc126aa9dd76a85d3
parent2b334a5ad6dd8f0afd6d615c8d55abb1bf54ec7b (diff)
Skip directory entries which have a file number of 0
-rw-r--r--usr.bin/cvs/file.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/usr.bin/cvs/file.c b/usr.bin/cvs/file.c
index a180b1741ef..adfc08d3207 100644
--- a/usr.bin/cvs/file.c
+++ b/usr.bin/cvs/file.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: file.c,v 1.30 2004/08/27 13:05:55 jfb Exp $ */
+/* $OpenBSD: file.c,v 1.31 2004/08/27 14:00:29 jfb Exp $ */
/*
* Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org>
* All rights reserved.
@@ -496,6 +496,8 @@ cvs_file_getdir(CVSFILE *cf, int flags)
ep = fbuf + (size_t)ret;
while (dp < ep) {
ent = (struct dirent *)dp;
+ if (ent->d_fileno == 0)
+ continue;
dp += ent->d_reclen;
if ((flags & CF_IGNORE) && cvs_file_chkign(ent->d_name))