summaryrefslogtreecommitdiff
path: root/usr.bin/rcs/rcsprog.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin/rcs/rcsprog.c')
-rw-r--r--usr.bin/rcs/rcsprog.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/rcs/rcsprog.c b/usr.bin/rcs/rcsprog.c
index 2ab634b118c..9822714f011 100644
--- a/usr.bin/rcs/rcsprog.c
+++ b/usr.bin/rcs/rcsprog.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rcsprog.c,v 1.79 2006/03/20 17:41:37 xsa Exp $ */
+/* $OpenBSD: rcsprog.c,v 1.80 2006/03/21 02:45:09 ray Exp $ */
/*
* Copyright (c) 2005 Jean-Francois Brousseau <jfb@openbsd.org>
* All rights reserved.
@@ -362,8 +362,8 @@ rcs_statfile(char *fname, char *out, size_t len)
if ((rcspath = rcs_choosefile(fname)) == NULL)
fatal("rcs_statfile: path truncation");
- /* File not found. */
- if (stat(rcspath, &st) == -1) {
+ /* Error out if file not found and we are not creating one. */
+ if (stat(rcspath, &st) == -1 && !(rcsflags & RCS_CREATE)) {
if ((strcmp(__progname, "rcsclean") != 0)
&& (strcmp(__progname, "ci") != 0))
cvs_log(LP_ERRNO, "%s", rcspath);