diff options
author | Ray Lai <ray@cvs.openbsd.org> | 2007-01-23 01:53:39 +0000 |
---|---|---|
committer | Ray Lai <ray@cvs.openbsd.org> | 2007-01-23 01:53:39 +0000 |
commit | 4532fce5b112e7d6bdd516918a5b92cc993efad5 (patch) | |
tree | 12396c53534687d79e39e187a6d742d9196774e7 /usr.bin | |
parent | 4d597a0c344c4beb65867c1106ecf5e2908d742f (diff) |
Don't fatal() when unexpected files are encountered in the working
copy. Allows obj/ directories to exist (which are typically
symlinks.)
OK joris@
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/cvs/file.c | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/usr.bin/cvs/file.c b/usr.bin/cvs/file.c index c75690d8897..0cab5834ad5 100644 --- a/usr.bin/cvs/file.c +++ b/usr.bin/cvs/file.c @@ -1,4 +1,4 @@ -/* $OpenBSD: file.c,v 1.174 2007/01/20 17:02:36 joris Exp $ */ +/* $OpenBSD: file.c,v 1.175 2007/01/23 01:53:38 ray Exp $ */ /* * Copyright (c) 2006 Joris Vink <joris@openbsd.org> * Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org> @@ -461,7 +461,8 @@ cvs_file_walkdir(struct cvs_file *cf, struct cvs_recursion *cr) type = CVS_FILE; break; default: - fatal("Unknown file type in copy"); + type = FILE_SKIP; + break; } } else { switch (dp->d_type) { @@ -472,10 +473,20 @@ cvs_file_walkdir(struct cvs_file *cf, struct cvs_recursion *cr) type = CVS_FILE; break; default: - fatal("Unknown file type in copy"); + type = FILE_SKIP; + break; } } + if (type == FILE_SKIP) { + if (verbosity > 1) { + cvs_log(LP_NOTICE, "ignoring `%s'", + dp->d_name); + } + cp += dp->d_reclen; + continue; + } + if (!(cr->flags & CR_RECURSE_DIRS) && type == CVS_DIR) { cp += dp->d_reclen; |