=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/cvs/util.c,v retrieving revision 1.115 retrieving revision 1.116 diff -c -r1.115 -r1.116 *** src/usr.bin/cvs/util.c 2007/09/04 19:07:04 1.115 --- src/usr.bin/cvs/util.c 2007/09/09 20:24:06 1.116 *************** *** 1,4 **** ! /* $OpenBSD: util.c,v 1.115 2007/09/04 19:07:04 tobias Exp $ */ /* * Copyright (c) 2004 Jean-Francois Brousseau * Copyright (c) 2005, 2006 Joris Vink --- 1,4 ---- ! /* $OpenBSD: util.c,v 1.116 2007/09/09 20:24:06 tobias Exp $ */ /* * Copyright (c) 2004 Jean-Francois Brousseau * Copyright (c) 2005, 2006 Joris Vink *************** *** 38,43 **** --- 38,45 ---- #include "cvs.h" #include "remote.h" + extern int print_stdout; + /* letter -> mode type map */ static const int cvs_modetypes[26] = { -1, -1, -1, -1, -1, -1, 1, -1, -1, -1, -1, -1, -1, *************** *** 501,506 **** --- 503,516 ---- { FILE *fp; char *s, fpath[MAXPATHLEN]; + + /* During checkout -p, do not use any locally available files. */ + if (cvs_cmdop == CVS_OP_CHECKOUT && print_stdout) { + dst[0] = '\0'; + if (strlcat(dst, dir, len) >= len) + fatal("cvs_get_repository_name: truncation"); + return; + } (void)xsnprintf(fpath, sizeof(fpath), "%s/%s", dir, CVS_PATH_REPOSITORY);