diff options
author | 2008-02-03 17:20:14 +0000 | |
---|---|---|
committer | 2008-02-03 17:20:14 +0000 | |
commit | bf6291b74fcc522176d71a4256d14bd934cb50e5 (patch) | |
tree | 24123163635e12cb65ede6ac6f07e9e6cb8a8f29 /usr.bin/cvs/util.c | |
parent | Do not unify this "-fr UNKNOWN" handling, it breaks commands which have (diff) | |
download | wireguard-openbsd-bf6291b74fcc522176d71a4256d14bd934cb50e5.tar.xz wireguard-openbsd-bf6291b74fcc522176d71a4256d14bd934cb50e5.zip |
better CVSROOT/module support, includes remote support and modules
that are not aliases (-a);
OK tobias@
Diffstat (limited to '')
-rw-r--r-- | usr.bin/cvs/util.c | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/usr.bin/cvs/util.c b/usr.bin/cvs/util.c index c9a37b6bd1e..d69adfcfc83 100644 --- a/usr.bin/cvs/util.c +++ b/usr.bin/cvs/util.c @@ -1,4 +1,4 @@ -/* $OpenBSD: util.c,v 1.129 2008/01/31 22:11:38 joris Exp $ */ +/* $OpenBSD: util.c,v 1.130 2008/02/03 17:20:14 joris Exp $ */ /* * Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org> * Copyright (c) 2005, 2006 Joris Vink <joris@openbsd.org> @@ -590,15 +590,21 @@ cvs_mkpath(const char *path, char *tag) if (dp != NULL) *(dp++) = '\0'; - if (repo[0] != '\0') { - len = strlcat(repo, "/", sizeof(repo)); + if (sp == dir && module_repo_root != NULL) { + len = strlcpy(repo, module_repo_root, sizeof(repo)); if (len >= (int)sizeof(repo)) fatal("cvs_mkpath: overflow"); - } + } else { + if (repo[0] != '\0') { + len = strlcat(repo, "/", sizeof(repo)); + if (len >= (int)sizeof(repo)) + fatal("cvs_mkpath: overflow"); + } - len = strlcat(repo, sp, sizeof(repo)); - if (len >= (int)sizeof(repo)) - fatal("cvs_mkpath: overflow"); + len = strlcat(repo, sp, sizeof(repo)); + if (len >= (int)sizeof(repo)) + fatal("cvs_mkpath: overflow"); + } if (rpath[0] != '\0') { len = strlcat(rpath, "/", sizeof(rpath)); |