summaryrefslogtreecommitdiff
path: root/usr.bin/cvs/file.c
diff options
context:
space:
mode:
authorJean-Francois Brousseau <jfb@cvs.openbsd.org>2005-01-06 20:15:17 +0000
committerJean-Francois Brousseau <jfb@cvs.openbsd.org>2005-01-06 20:15:17 +0000
commit284c8f2f83447f353860f56f086975e5be7c5e7d (patch)
tree9912bd1323fb28e5d794769ade049d7c03275986 /usr.bin/cvs/file.c
parent5fc409fb4a59df4deddd5c8b027ed9bbd2f5131b (diff)
* 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
Diffstat (limited to 'usr.bin/cvs/file.c')
-rw-r--r--usr.bin/cvs/file.c13
1 files changed, 7 insertions, 6 deletions
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 <jfb@openbsd.org>
* 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);