summaryrefslogtreecommitdiff
path: root/usr.bin/cvs/util.c
diff options
context:
space:
mode:
authorJoris Vink <joris@cvs.openbsd.org>2007-01-17 17:54:51 +0000
committerJoris Vink <joris@cvs.openbsd.org>2007-01-17 17:54:51 +0000
commit85fc4ab54949af79c8a6a9a5053de81499f6116a (patch)
treec1fe17e97e9da284c6c3c3961f56d14f4eba94b2 /usr.bin/cvs/util.c
parent2859e665e7d21c18819d9bbb86fbb84215aa09a2 (diff)
add support for remote checkout in both our client and server,
with this the last real dependency to actually be able to use opencvs in a remote setup has been added. based upon an initial diff from xsa@ 'kay niallo@
Diffstat (limited to 'usr.bin/cvs/util.c')
-rw-r--r--usr.bin/cvs/util.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/usr.bin/cvs/util.c b/usr.bin/cvs/util.c
index 34e1de8d0ac..6de7a36c86c 100644
--- a/usr.bin/cvs/util.c
+++ b/usr.bin/cvs/util.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: util.c,v 1.97 2007/01/11 17:44:18 niallo Exp $ */
+/* $OpenBSD: util.c,v 1.98 2007/01/17 17:54:50 joris Exp $ */
/*
* Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org>
* Copyright (c) 2005, 2006 Joris Vink <joris@openbsd.org>
@@ -611,8 +611,11 @@ cvs_get_repository_name(const char *dir, char *dst, size_t len)
}
}
} else {
- if (strlcat(dst, dir, len) >= len)
- fatal("cvs_get_repository_name: truncation");
+ if (cvs_cmdop != CVS_OP_CHECKOUT) {
+ if (strlcat(dst, dir, len) >= len)
+ fatal("cvs_get_repository_name: "
+ "truncation");
+ }
}
}
}
@@ -727,7 +730,7 @@ cvs_mkpath(const char *path)
if (mkdir(rpath, 0755) == -1 && errno != EEXIST)
fatal("cvs_mkpath: %s: %s", rpath, strerror(errno));
- cvs_mkadmin(rpath, current_cvsroot->cr_dir, repo,
+ cvs_mkadmin(rpath, current_cvsroot->cr_str, repo,
NULL, NULL, 0);
}