=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/cvs/file.c,v retrieving revision 1.150 retrieving revision 1.151 diff -u -r1.150 -r1.151 --- src/usr.bin/cvs/file.c 2006/05/29 06:05:56 1.150 +++ src/usr.bin/cvs/file.c 2006/05/30 07:00:30 1.151 @@ -1,4 +1,4 @@ -/* $OpenBSD: file.c,v 1.150 2006/05/29 06:05:56 joris Exp $ */ +/* $OpenBSD: file.c,v 1.151 2006/05/30 07:00:30 joris Exp $ */ /* * Copyright (c) 2006 Joris Vink * Copyright (c) 2004 Jean-Francois Brousseau @@ -373,7 +373,8 @@ fpath = xmalloc(MAXPATHLEN); /* - * If we do not have a admin directory inside here, dont bother. + * If we do not have a admin directory inside here, dont bother, + * unless we are running import. */ l = snprintf(fpath, MAXPATHLEN, "%s/%s", cf->file_path, CVS_PATH_CVSDIR); @@ -381,7 +382,8 @@ fatal("cvs_file_walkdir: overflow"); l = stat(fpath, &st); - if (l == -1 || (l == 0 && !S_ISDIR(st.st_mode))) { + if (cvs_cmdop != CVS_OP_IMPORT && + (l == -1 || (l == 0 && !S_ISDIR(st.st_mode)))) { xfree(fpath); return; } @@ -554,7 +556,6 @@ } verbose = (verbosity > 1 && loud == 1); - entlist = cvs_ent_open(cf->file_wd); repo = xmalloc(MAXPATHLEN); rcsfile = xmalloc(MAXPATHLEN); @@ -572,6 +573,8 @@ } cf->file_rpath = xstrdup(rcsfile); + + entlist = cvs_ent_open(cf->file_wd); cf->file_ent = cvs_ent_get(entlist, cf->file_name); if (cf->file_ent != NULL) {