diff options
author | Joris Vink <joris@cvs.openbsd.org> | 2009-02-21 13:40:00 +0000 |
---|---|---|
committer | Joris Vink <joris@cvs.openbsd.org> | 2009-02-21 13:40:00 +0000 |
commit | fcdb267cb4a93ef44b07b50fe1d8d818fa469aed (patch) | |
tree | df43d852d3dd484971ac886526f75a5bb5b0bbc5 /usr.bin/cvs | |
parent | 98d343b077b7b3e0591c973266575a6a4805af44 (diff) |
in cvs_mkpath() always look for an existing CVS/Repository file
unless we're running checkout or export.
otherwise we'll end up accidently overwriting it in certain cases
on the client side of things.
Diffstat (limited to 'usr.bin/cvs')
-rw-r--r-- | usr.bin/cvs/util.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/cvs/util.c b/usr.bin/cvs/util.c index 339179155e1..ca3c7d88d0a 100644 --- a/usr.bin/cvs/util.c +++ b/usr.bin/cvs/util.c @@ -1,4 +1,4 @@ -/* $OpenBSD: util.c,v 1.147 2008/06/21 15:39:15 joris Exp $ */ +/* $OpenBSD: util.c,v 1.148 2009/02/21 13:39:59 joris Exp $ */ /* * Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org> * Copyright (c) 2005, 2006 Joris Vink <joris@openbsd.org> @@ -614,7 +614,7 @@ cvs_mkpath(const char *path, char *tag) repo[0] = '\0'; rpath[0] = '\0'; - if (cvs_cmdop == CVS_OP_UPDATE || cvs_cmdop == CVS_OP_COMMIT) { + if ((cvs_cmdop != CVS_OP_CHECKOUT) && (cvs_cmdop != CVS_OP_EXPORT)) { if ((fp = fopen(CVS_PATH_REPOSITORY, "r")) != NULL) { if ((fgets(repo, sizeof(repo), fp)) == NULL) fatal("cvs_mkpath: bad repository file"); |