summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>2001-06-22 22:51:23 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>2001-06-22 22:51:23 +0000
commitc914780d9b2438a0dc98f481e26c5dd487fc6adc (patch)
treebeb4849c4adb900a7a975c357849c4f002003710 /bin
parent946f33ec96f06c65e90f791ca5356d57ae89c712 (diff)
Avoid printing warnings about things like "is a directory" twice.
Found by fgs.
Diffstat (limited to 'bin')
-rw-r--r--bin/cp/cp.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/bin/cp/cp.c b/bin/cp/cp.c
index 1db38ddff7c..179d31d284b 100644
--- a/bin/cp/cp.c
+++ b/bin/cp/cp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cp.c,v 1.15 2001/06/06 16:06:33 millert Exp $ */
+/* $OpenBSD: cp.c,v 1.16 2001/06/22 22:51:22 millert Exp $ */
/* $NetBSD: cp.c,v 1.14 1995/09/07 06:14:51 jtc Exp $ */
/*
@@ -47,7 +47,7 @@ static char copyright[] =
#if 0
static char sccsid[] = "@(#)cp.c 8.5 (Berkeley) 4/29/95";
#else
-static char rcsid[] = "$OpenBSD: cp.c,v 1.15 2001/06/06 16:06:33 millert Exp $";
+static char rcsid[] = "$OpenBSD: cp.c,v 1.16 2001/06/22 22:51:22 millert Exp $";
#endif
#endif /* not lint */
@@ -360,9 +360,11 @@ copy(argv, type, fts_options)
}
/* Not an error but need to remember it happened */
- if (stat(to.p_path, &to_stat) == -1)
+ if (stat(to.p_path, &to_stat) == -1) {
+ if (curr->fts_info == FTS_DP)
+ continue;
dne = 1;
- else {
+ } else {
/*
* For -p mode, we need to reset the directory
* times in the post-order pass since the times