summaryrefslogtreecommitdiff
path: root/usr.bin/cvs/add.c
diff options
context:
space:
mode:
authorJoris Vink <joris@cvs.openbsd.org>2009-02-21 14:50:54 +0000
committerJoris Vink <joris@cvs.openbsd.org>2009-02-21 14:50:54 +0000
commitc2ba0921de160a4bb10293dfaa537f9f1e87d8ca (patch)
tree94065c663dd8c60e38a52969e46d77fc0db3133d /usr.bin/cvs/add.c
parent53146bfe603e5b82e27e15e3ce328636640a3298 (diff)
use FILE_ON_DISK flags when we need to verify if a file
exists in the working copy or not instead of checking fd being -1 since this can differ in server or local mode.
Diffstat (limited to 'usr.bin/cvs/add.c')
-rw-r--r--usr.bin/cvs/add.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/cvs/add.c b/usr.bin/cvs/add.c
index 7a35b25c979..d8800314942 100644
--- a/usr.bin/cvs/add.c
+++ b/usr.bin/cvs/add.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: add.c,v 1.106 2009/01/02 00:11:01 canacar Exp $ */
+/* $OpenBSD: add.c,v 1.107 2009/02/21 14:50:53 joris Exp $ */
/*
* Copyright (c) 2006 Joris Vink <joris@openbsd.org>
* Copyright (c) 2005, 2006 Xavier Santolaria <xsa@openbsd.org>
@@ -438,7 +438,7 @@ add_file(struct cvs_file *cf)
if (cf->file_rcs == NULL) {
cvs_log(LP_NOTICE, "cannot resurrect %s; "
"RCS file removed by second party", cf->file_name);
- } else if (cf->fd == -1) {
+ } else if (!(cf->file_flags & FILE_ON_DISK)) {
add_entry(cf);
/* Restore the file. */
@@ -469,7 +469,7 @@ add_file(struct cvs_file *cf)
"(instead of dead revision %s)",
cf->file_path, revbuf);
added++;
- } else if (cf->fd != -1) {
+ } else if (cf->file_flags & FILE_ON_DISK) {
cvs_log(LP_NOTICE, "scheduling file '%s' for addition",
cf->file_path);
added++;