diff options
author | Joris Vink <joris@cvs.openbsd.org> | 2005-07-29 22:59:11 +0000 |
---|---|---|
committer | Joris Vink <joris@cvs.openbsd.org> | 2005-07-29 22:59:11 +0000 |
commit | 4654fe49edf1731316a76df08f77c5ebe63b4b0b (patch) | |
tree | 2307021c46e21b72f28073f308b7571739f09f01 | |
parent | 579a744caec648aafec706212e189e2734ac2101 (diff) |
make sure we do not try to send the file to the server if it is no
longer on disk.
problem reported by Nuno Morgadinho.
ok xsa@
-rw-r--r-- | usr.bin/cvs/remove.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/usr.bin/cvs/remove.c b/usr.bin/cvs/remove.c index a51307bcade..014bda32ce2 100644 --- a/usr.bin/cvs/remove.c +++ b/usr.bin/cvs/remove.c @@ -1,4 +1,4 @@ -/* $OpenBSD: remove.c,v 1.30 2005/07/27 17:14:08 xsa Exp $ */ +/* $OpenBSD: remove.c,v 1.31 2005/07/29 22:59:10 joris Exp $ */ /* * Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org> * Copyright (c) 2004, 2005 Xavier Santolaria <xsa@openbsd.org> @@ -131,8 +131,10 @@ cvs_remove_remote(CVSFILE *cf, void *arg) return (CVS_EX_PROTO); } - if (cvs_sendfile(root, fpath) < 0) - return (CVS_EX_PROTO); + if (cf->cf_flags & CVS_FILE_ONDISK) { + if (cvs_sendfile(root, fpath) < 0) + return (CVS_EX_PROTO); + } } return (0); |