From 0b10fb8576cfd37796bed6f4a548348ff88d86b8 Mon Sep 17 00:00:00 2001 From: xsa Date: Wed, 10 Jan 2007 21:32:19 +0000 Subject: add a cvs_file_copy routine and use it for the edit command to copy the file in the current working directory to CVS/Base/ ok ray@ joris@. --- usr.bin/cvs/edit.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'usr.bin/cvs/edit.c') diff --git a/usr.bin/cvs/edit.c b/usr.bin/cvs/edit.c index f55f66cfbbb..1f428d6e408 100644 --- a/usr.bin/cvs/edit.c +++ b/usr.bin/cvs/edit.c @@ -1,4 +1,4 @@ -/* $OpenBSD: edit.c,v 1.25 2007/01/09 10:01:43 xsa Exp $ */ +/* $OpenBSD: edit.c,v 1.26 2007/01/10 21:32:19 xsa Exp $ */ /* * Copyright (c) 2006, 2007 Xavier Santolaria * @@ -303,7 +303,8 @@ cvs_edit_local(struct cvs_file *cf) fatal("cvs_edit_local: `%s': %s", CVS_PATH_BASEDIR, strerror(errno)); - /* XXX: copy cf->file_path to bfpath */ + if (cvs_file_copy(cf->file_path, bfpath) == -1) + fatal("cvs_edit_local: cvs_file_copy failed"); xfree(bfpath); -- cgit v1.2.3-59-g8ed1b