summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorJoris Vink <joris@cvs.openbsd.org>2006-05-30 22:05:54 +0000
committerJoris Vink <joris@cvs.openbsd.org>2006-05-30 22:05:54 +0000
commit612dbbc6665a20b7082ce53b66dcaf58c62a59e5 (patch)
tree6e2bcbfc80f2b2829d6edcf10bb4a9eae3d6f9ce /usr.bin
parent695e92d9764fb53a4a364bf593837e4218c2abca (diff)
correctly handle unknown file in remove
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/cvs/remove.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/usr.bin/cvs/remove.c b/usr.bin/cvs/remove.c
index 97a949bd1cb..3ea396947fa 100644
--- a/usr.bin/cvs/remove.c
+++ b/usr.bin/cvs/remove.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: remove.c,v 1.50 2006/05/30 21:32:52 joris Exp $ */
+/* $OpenBSD: remove.c,v 1.51 2006/05/30 22:05:53 joris Exp $ */
/*
* Copyright (c) 2005, 2006 Xavier Santolaria <xsa@openbsd.org>
*
@@ -110,6 +110,13 @@ cvs_remove_local(struct cvs_file *cf)
cvs_file_classify(cf, NULL, 0);
+ if (cf->file_status == FILE_UNKNOWN) {
+ if (verbosity > 1)
+ cvs_log(LP_NOTICE, "nothing known about '%s'",
+ cf->file_path);
+ return;
+ }
+
if (force_remove == 1) {
if (unlink(cf->file_path) == -1)
fatal("cvs_remove_local: %s", strerror(errno));