From 1a07485866c1726e56c4633c371ba3068268430a Mon Sep 17 00:00:00 2001 From: Tobias Stoeckmann Date: Thu, 31 Jan 2008 13:54:13 +0000 Subject: 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@ --- usr.bin/cvs/repository.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'usr.bin/cvs') 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 * @@ -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); -- cgit v1.2.3