summaryrefslogtreecommitdiff
path: root/usr.bin/cvs
diff options
context:
space:
mode:
authorTobias Stoeckmann <tobias@cvs.openbsd.org>2008-01-31 13:54:13 +0000
committerTobias Stoeckmann <tobias@cvs.openbsd.org>2008-01-31 13:54:13 +0000
commit1a07485866c1726e56c4633c371ba3068268430a (patch)
tree495b77843ef310f124c9dd78c2a8697bfd4dba39 /usr.bin/cvs
parent5b4dde59a0b228868613dcc5b164815ca83c085f (diff)
On repository-side, only parse files which end with ,v (RCS_FILE_EXT).
File name ",v" is ignored, too -- in opposite to weird GNU cvs that tries to create a file without name. OK joris@
Diffstat (limited to 'usr.bin/cvs')
-rw-r--r--usr.bin/cvs/repository.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/usr.bin/cvs/repository.c b/usr.bin/cvs/repository.c
index ec9f698cc02..4ef127ee509 100644
--- a/usr.bin/cvs/repository.c
+++ b/usr.bin/cvs/repository.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: repository.c,v 1.16 2008/01/10 09:57:51 tobias Exp $ */
+/* $OpenBSD: repository.c,v 1.17 2008/01/31 13:54:12 tobias Exp $ */
/*
* Copyright (c) 2006 Joris Vink <joris@openbsd.org>
*
@@ -150,9 +150,11 @@ cvs_repository_getdir(const char *dir, const char *wdir,
cvs_file_get(fpath, 0, dl);
break;
case CVS_FILE:
- if ((s = strrchr(fpath, ',')) != NULL)
+ if ((s = strrchr(fpath, ',')) != NULL &&
+ s != fpath && !strcmp(s, RCS_FILE_EXT)) {
*s = '\0';
- cvs_file_get(fpath, 0, fl);
+ cvs_file_get(fpath, 0, fl);
+ }
break;
default:
fatal("type %d unknown, shouldn't happen", type);