summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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);