summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorJoris Vink <joris@cvs.openbsd.org>2007-01-27 20:23:27 +0000
committerJoris Vink <joris@cvs.openbsd.org>2007-01-27 20:23:27 +0000
commit9ee1988ec45195add8c149f5ab93f7720bd3ed90 (patch)
tree473ba363d31d762fcaeb0cae3556c05aee804d2f /usr.bin
parent3292caa6b18d90fba266c5b5898e9fc967e32aab (diff)
when we specify the 'f' flag do not bother removing files that
dont exist on disk anyway, and when removing a file that has been added but not commited the correct file_status is FILE_REMOVE_ENTRY and not FILE_ADDED. ok otto@
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/cvs/remove.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/cvs/remove.c b/usr.bin/cvs/remove.c
index 6c30a5df4b5..1699b896915 100644
--- a/usr.bin/cvs/remove.c
+++ b/usr.bin/cvs/remove.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: remove.c,v 1.60 2007/01/11 02:35:55 joris Exp $ */
+/* $OpenBSD: remove.c,v 1.61 2007/01/27 20:23:26 joris Exp $ */
/*
* Copyright (c) 2005, 2006 Xavier Santolaria <xsa@openbsd.org>
*
@@ -121,7 +121,7 @@ void
cvs_remove_force(struct cvs_file *cf)
{
if (cf->file_type != CVS_DIR) {
- if (force_remove == 1 && cvs_noexec == 0) {
+ if (cf->fd != -1 && force_remove == 1 && cvs_noexec == 0) {
if (unlink(cf->file_path) == -1)
fatal("cvs_remove_force: %s", strerror(errno));
(void)close(cf->fd);
@@ -161,7 +161,7 @@ cvs_remove_local(struct cvs_file *cf)
existing++;
} else {
switch (cf->file_status) {
- case FILE_ADDED:
+ case FILE_REMOVE_ENTRY:
entlist = cvs_ent_open(cf->file_wd);
cvs_ent_remove(entlist, cf->file_name);
cvs_ent_close(entlist, ENT_SYNC);