summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorXavier Santolaria <xsa@cvs.openbsd.org>2007-01-05 09:41:31 +0000
committerXavier Santolaria <xsa@cvs.openbsd.org>2007-01-05 09:41:31 +0000
commite9ae30055e13c90e6dce2d22d2c5a603c652623f (patch)
tree60cc891ecda035db8ae990f0c7d25be02ff441f1 /usr.bin
parentca43598c1b6836e78ef8b50e791d221ba492769c (diff)
for edit: create the CVS/Base directory if it does not already exist.
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/cvs/edit.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/usr.bin/cvs/edit.c b/usr.bin/cvs/edit.c
index c99e6bc5c85..64e703d9259 100644
--- a/usr.bin/cvs/edit.c
+++ b/usr.bin/cvs/edit.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: edit.c,v 1.21 2007/01/05 09:32:49 xsa Exp $ */
+/* $OpenBSD: edit.c,v 1.22 2007/01/05 09:41:30 xsa Exp $ */
/*
* Copyright (c) 2006, 2007 Xavier Santolaria <xsa@openbsd.org>
*
@@ -289,6 +289,10 @@ cvs_edit_local(struct cvs_file *cf)
MAXPATHLEN) >= MAXPATHLEN)
fatal("cvs_edit_local: truncation");
+ if (mkdir(CVS_PATH_BASEDIR, 0755) == -1 && errno != EEXIST)
+ fatal("cvs_edit_local: `%s': %s", CVS_PATH_BASEDIR,
+ strerror(errno));
+
/* XXX: copy cf->file_path to bfpath */
xfree(bfpath);