From 284c8f2f83447f353860f56f086975e5be7c5e7d Mon Sep 17 00:00:00 2001 From: Jean-Francois Brousseau Date: Thu, 6 Jan 2005 20:15:17 +0000 Subject: * always assign a cvsroot to directories, even if they are unknown to cvs * only avoid recursion on unknown directories if the CF_KNOWN flag was specified --- usr.bin/cvs/file.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'usr.bin/cvs/file.c') diff --git a/usr.bin/cvs/file.c b/usr.bin/cvs/file.c index aaa38e743c2..813dbe06891 100644 --- a/usr.bin/cvs/file.c +++ b/usr.bin/cvs/file.c @@ -1,4 +1,4 @@ -/* $OpenBSD: file.c,v 1.47 2005/01/03 22:53:06 jfb Exp $ */ +/* $OpenBSD: file.c,v 1.48 2005/01/06 20:15:16 jfb Exp $ */ /* * Copyright (c) 2004 Jean-Francois Brousseau * All rights reserved. @@ -557,11 +557,11 @@ cvs_file_getdir(CVSFILE *cf, int flags) cvs_file_getpath(cf, fpath, sizeof(fpath)); - if (cf->cf_cvstat != CVS_FST_UNKNOWN) { - cdp->cd_root = cvsroot_get(fpath); - if (cdp->cd_root == NULL) - return (-1); + cdp->cd_root = cvsroot_get(fpath); + if (cdp->cd_root == NULL) + return (-1); + if (cf->cf_cvstat != CVS_FST_UNKNOWN) { if (flags & CF_MKADMIN) cvs_mkadmin(cf, 0755); @@ -581,7 +581,8 @@ cvs_file_getdir(CVSFILE *cf, int flags) } } - if (!(flags & CF_RECURSE) || (cf->cf_cvstat == CVS_FST_UNKNOWN)) + if (!(flags & CF_RECURSE) || + ((flags & CF_KNOWN) && (cf->cf_cvstat == CVS_FST_UNKNOWN))) return (0); fd = open(fpath, O_RDONLY); -- cgit v1.2.3