=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/cvs/file.c,v retrieving revision 1.145 retrieving revision 1.146 diff -c -r1.145 -r1.146 *** src/usr.bin/cvs/file.c 2006/05/28 10:14:59 1.145 --- src/usr.bin/cvs/file.c 2006/05/28 17:25:18 1.146 *************** *** 1,4 **** ! /* $OpenBSD: file.c,v 1.145 2006/05/28 10:14:59 joris Exp $ */ /* * Copyright (c) 2006 Joris Vink * Copyright (c) 2004 Jean-Francois Brousseau --- 1,4 ---- ! /* $OpenBSD: file.c,v 1.146 2006/05/28 17:25:18 joris Exp $ */ /* * Copyright (c) 2006 Joris Vink * Copyright (c) 2004 Jean-Francois Brousseau *************** *** 261,266 **** --- 261,267 ---- if ((d = dirname(l->file_path)) == NULL) fatal("cvs_file_walklist: dirname failed"); + type = CVS_FILE; if ((fd = open(l->file_path, O_RDONLY)) != -1) { if (fstat(fd, &st) == -1) { cvs_log(LP_ERRNO, "%s", l->file_path); *************** *** 285,291 **** goto next; } ! cvs_get_repo(d, repo, MAXPATHLEN); len = snprintf(fpath, MAXPATHLEN, "%s/%s", repo, f); if (len == -1 || len >= MAXPATHLEN) --- 286,292 ---- goto next; } ! cvs_get_repository_path(d, repo, MAXPATHLEN); len = snprintf(fpath, MAXPATHLEN, "%s/%s", repo, f); if (len == -1 || len >= MAXPATHLEN) *************** *** 367,372 **** --- 368,376 ---- if (cr->local != NULL) cr->local(cf); + if (cf->file_status == FILE_SKIP) + return; + fpath = xmalloc(MAXPATHLEN); /* *************** *** 377,383 **** if (l == -1 || l >= MAXPATHLEN) fatal("cvs_file_walkdir: overflow"); ! if (stat(fpath, &st) == -1) { xfree(fpath); return; } --- 381,388 ---- if (l == -1 || l >= MAXPATHLEN) fatal("cvs_file_walkdir: overflow"); ! l = stat(fpath, &st); ! if (l == -1 || (l == 0 && !S_ISDIR(st.st_mode))) { xfree(fpath); return; } *************** *** 494,500 **** if (cr->flags & CR_REPO) { repo = xmalloc(MAXPATHLEN); ! cvs_get_repo(cf->file_path, repo, MAXPATHLEN); cvs_repository_lock(repo); cvs_repository_getdir(repo, cf->file_path, &fl, &dl, --- 499,505 ---- if (cr->flags & CR_REPO) { repo = xmalloc(MAXPATHLEN); ! cvs_get_repository_path(cf->file_path, repo, MAXPATHLEN); cvs_repository_lock(repo); cvs_repository_getdir(repo, cf->file_path, &fl, &dl, *************** *** 554,560 **** repo = xmalloc(MAXPATHLEN); rcsfile = xmalloc(MAXPATHLEN); ! cvs_get_repo(cf->file_wd, repo, MAXPATHLEN); l = snprintf(rcsfile, MAXPATHLEN, "%s/%s", repo, cf->file_name); if (l == -1 || l >= MAXPATHLEN) --- 559,565 ---- repo = xmalloc(MAXPATHLEN); rcsfile = xmalloc(MAXPATHLEN); ! cvs_get_repository_path(cf->file_wd, repo, MAXPATHLEN); l = snprintf(rcsfile, MAXPATHLEN, "%s/%s", repo, cf->file_name); if (l == -1 || l >= MAXPATHLEN)