summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjoris <joris@openbsd.org>2009-02-21 13:39:59 +0000
committerjoris <joris@openbsd.org>2009-02-21 13:39:59 +0000
commit5b2d50e5124b5b3a5736fbda574a84291d5ed83c (patch)
tree932d366e867083940e0799bfb26bb0f93a5a6b84
parentcorrect Set-sticky and Clear-sticky responses to (diff)
downloadwireguard-openbsd-5b2d50e5124b5b3a5736fbda574a84291d5ed83c.tar.xz
wireguard-openbsd-5b2d50e5124b5b3a5736fbda574a84291d5ed83c.zip
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.
-rw-r--r--usr.bin/cvs/util.c4
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");