diff options
author | Tobias Stoeckmann <tobias@cvs.openbsd.org> | 2008-06-08 02:54:09 +0000 |
---|---|---|
committer | Tobias Stoeckmann <tobias@cvs.openbsd.org> | 2008-06-08 02:54:09 +0000 |
commit | 3be2a24cd934b7aff7b6d60b9177959a80ef89c7 (patch) | |
tree | 4f33503aa3c20a68d55f80bad6cd4f5f06caf621 /usr.bin | |
parent | 0f750fa7bca200bc618a475d549ea32144d19139 (diff) |
Properly build up path to description files (descr entry in RCS files if
you add a file with -m message).
ok joris
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/cvs/add.c | 7 | ||||
-rw-r--r-- | usr.bin/cvs/commit.c | 6 | ||||
-rw-r--r-- | usr.bin/cvs/remove.c | 4 |
3 files changed, 9 insertions, 8 deletions
diff --git a/usr.bin/cvs/add.c b/usr.bin/cvs/add.c index f2fed8a3611..041e6df498c 100644 --- a/usr.bin/cvs/add.c +++ b/usr.bin/cvs/add.c @@ -1,4 +1,4 @@ -/* $OpenBSD: add.c,v 1.98 2008/05/22 15:45:01 tobias Exp $ */ +/* $OpenBSD: add.c,v 1.99 2008/06/08 02:54:08 tobias Exp $ */ /* * Copyright (c) 2006 Joris Vink <joris@openbsd.org> * Copyright (c) 2005, 2006 Xavier Santolaria <xsa@openbsd.org> @@ -408,8 +408,9 @@ add_entry(struct cvs_file *cf) 0, 0, entry, CVS_ENT_MAXLINELEN); } else { if (logmsg != NULL) { - (void)xsnprintf(path, MAXPATHLEN, "%s/%s%s", - CVS_PATH_CVSDIR, cf->file_name, CVS_DESCR_FILE_EXT); + (void)xsnprintf(path, MAXPATHLEN, "%s/%s/%s%s", + cf->file_wd, CVS_PATH_CVSDIR, cf->file_name, + CVS_DESCR_FILE_EXT); if ((fp = fopen(path, "w+")) == NULL) fatal("add_entry: fopen `%s': %s", diff --git a/usr.bin/cvs/commit.c b/usr.bin/cvs/commit.c index bcda61658d7..009c90ee226 100644 --- a/usr.bin/cvs/commit.c +++ b/usr.bin/cvs/commit.c @@ -1,4 +1,4 @@ -/* $OpenBSD: commit.c,v 1.133 2008/05/17 21:06:44 tobias Exp $ */ +/* $OpenBSD: commit.c,v 1.134 2008/06/08 02:54:08 tobias Exp $ */ /* * Copyright (c) 2006 Joris Vink <joris@openbsd.org> * Copyright (c) 2006 Xavier Santolaria <xsa@openbsd.org> @@ -617,8 +617,8 @@ commit_desc_set(struct cvs_file *cf) int fd; char desc_path[MAXPATHLEN], *desc; - (void)xsnprintf(desc_path, MAXPATHLEN, "%s/%s%s", - CVS_PATH_CVSDIR, cf->file_name, CVS_DESCR_FILE_EXT); + (void)xsnprintf(desc_path, MAXPATHLEN, "%s/%s/%s%s", + cf->file_wd, CVS_PATH_CVSDIR, cf->file_name, CVS_DESCR_FILE_EXT); if ((fd = open(desc_path, O_RDONLY)) == -1) return; diff --git a/usr.bin/cvs/remove.c b/usr.bin/cvs/remove.c index e8797cb22af..6957fb51df4 100644 --- a/usr.bin/cvs/remove.c +++ b/usr.bin/cvs/remove.c @@ -1,4 +1,4 @@ -/* $OpenBSD: remove.c,v 1.73 2008/03/08 20:26:34 joris Exp $ */ +/* $OpenBSD: remove.c,v 1.74 2008/06/08 02:54:08 tobias Exp $ */ /* * Copyright (c) 2005, 2006 Xavier Santolaria <xsa@openbsd.org> * @@ -169,7 +169,7 @@ cvs_remove_local(struct cvs_file *cf) cvs_ent_close(entlist, ENT_SYNC); (void)xsnprintf(buf, sizeof(buf), "%s/%s/%s%s", - cf->file_path, CVS_PATH_CVSDIR, cf->file_name, + cf->file_wd, CVS_PATH_CVSDIR, cf->file_name, CVS_DESCR_FILE_EXT); (void)unlink(buf); |