=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/cvs/file.c,v retrieving revision 1.154 retrieving revision 1.155 diff -c -r1.154 -r1.155 *** src/usr.bin/cvs/file.c 2006/05/30 22:06:13 1.154 --- src/usr.bin/cvs/file.c 2006/05/31 01:26:22 1.155 *************** *** 1,4 **** ! /* $OpenBSD: file.c,v 1.154 2006/05/30 22:06:13 joris Exp $ */ /* * Copyright (c) 2006 Joris Vink * Copyright (c) 2004 Jean-Francois Brousseau --- 1,4 ---- ! /* $OpenBSD: file.c,v 1.155 2006/05/31 01:26:22 joris Exp $ */ /* * Copyright (c) 2006 Joris Vink * Copyright (c) 2004 Jean-Francois Brousseau *************** *** 618,635 **** if (cf->file_rcs == NULL) fatal("cvs_file_classify: failed to parse RCS"); cf->file_rcs->rf_inattic = 0; ! } else if (cvs_cmdop != CVS_OP_UPDATE && cvs_cmdop != CVS_OP_CHECKOUT ! && cvs_cmdop != CVS_OP_COMMIT) { ! xfree(cf->file_rpath); l = snprintf(rcsfile, MAXPATHLEN, "%s/%s/%s%s", repo, CVS_PATH_ATTIC, cf->file_name, RCS_FILE_EXT); if (l == -1 || l >= MAXPATHLEN) fatal("cvs_file_classify: overflow"); ! cf->file_rpath = xstrdup(rcsfile); ! ! cf->repo_fd = open(cf->file_rpath, O_RDONLY); if (cf->repo_fd != -1) { cf->file_rcs = rcs_open(cf->file_rpath, cf->repo_fd, rflags); if (cf->file_rcs == NULL) --- 618,633 ---- if (cf->file_rcs == NULL) fatal("cvs_file_classify: failed to parse RCS"); cf->file_rcs->rf_inattic = 0; ! } else if (cvs_cmdop != CVS_OP_CHECKOUT) { l = snprintf(rcsfile, MAXPATHLEN, "%s/%s/%s%s", repo, CVS_PATH_ATTIC, cf->file_name, RCS_FILE_EXT); if (l == -1 || l >= MAXPATHLEN) fatal("cvs_file_classify: overflow"); ! cf->repo_fd = open(rcsfile, O_RDONLY); if (cf->repo_fd != -1) { + xfree(cf->file_rpath); + cf->file_rpath = xstrdup(rcsfile); cf->file_rcs = rcs_open(cf->file_rpath, cf->repo_fd, rflags); if (cf->file_rcs == NULL)