diff options
author | obrien <obrien@FreeBSD.org> | 2008-03-19 15:11:46 +0000 |
---|---|---|
committer | obrien <obrien@FreeBSD.org> | 2008-03-19 15:11:46 +0000 |
commit | 4f8541364ad4cdfd6ed314f550276f5e431b97f5 (patch) | |
tree | 93923d8c7b4887c0ba4210a7ef5e0871c7b4f838 /contrib/cvs/src/import.c | |
parent | 134c02a9d43c4d7e3510328fadba2d7bcc7579a1 (diff) | |
download | FreeBSD-src-4f8541364ad4cdfd6ed314f550276f5e431b97f5.zip FreeBSD-src-4f8541364ad4cdfd6ed314f550276f5e431b97f5.tar.gz |
We use the stock versions of these files.
Diffstat (limited to 'contrib/cvs/src/import.c')
-rw-r--r-- | contrib/cvs/src/import.c | 25 |
1 files changed, 16 insertions, 9 deletions
diff --git a/contrib/cvs/src/import.c b/contrib/cvs/src/import.c index d4e2f24..0f82332 100644 --- a/contrib/cvs/src/import.c +++ b/contrib/cvs/src/import.c @@ -164,14 +164,21 @@ import (argc, argv) * Could abstract this to valid_module_path, but I don't think we'll need * to call it from anywhere else. */ - if ((cp = strstr(argv[0], "CVS")) && /* path contains "CVS" AND ... */ - ((cp == argv[0]) || ISDIRSEP(*(cp-1))) && /* /^CVS/ OR m#/CVS# AND ... */ - ((*(cp+3) == '\0') || ISDIRSEP(*(cp+3))) /* /CVS$/ OR m#CVS/# */ - ) + /* for each "CVS" in path... */ + cp = argv[0]; + while ((cp = strstr(cp, "CVS")) != NULL) { - error (0, 0, - "The word `CVS' is reserved by CVS and may not be used"); - error (1, 0, "as a directory in a path or as a file name."); + if ( /* /^CVS/ OR m#/CVS#... */ + (cp == argv[0] || ISDIRSEP(*(cp-1))) + /* ...AND /CVS$/ OR m#CVS/# */ + && (*(cp+3) == '\0' || ISDIRSEP(*(cp+3))) + ) + { + error (0, 0, + "The word `CVS' is reserved by CVS and may not be used"); + error (1, 0, "as a directory in a path or as a file name."); + } + cp += 3; } for (i = 1; i < argc; i++) /* check the tags for validity */ @@ -1603,8 +1610,8 @@ import_descend_dir (message, dir, vtag, targc, targv) if ( CVS_CHDIR (dir) < 0) { ierrno = errno; - fperrmsg (logfp, 0, ierrno, "ERROR: cannot chdir to %s", repository); - error (0, ierrno, "ERROR: cannot chdir to %s", repository); + fperrmsg (logfp, 0, ierrno, "ERROR: cannot chdir to %s", dir); + error (0, ierrno, "ERROR: cannot chdir to %s", dir); err = 1; goto out; } |