Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.sbin/mtree -n is incorrectly supressing the ".." lines. ...



details:   https://anonhg.NetBSD.org/src/rev/dbfeea5cfe53
branches:  trunk
changeset: 783259:dbfeea5cfe53
user:      christos <christos%NetBSD.org@localhost>
date:      Wed Dec 12 15:50:35 2012 +0000

description:
-n is incorrectly supressing the ".." lines. (Brooks Davis)

diffstat:

 usr.sbin/mtree/create.c |  13 ++++++++-----
 1 files changed, 8 insertions(+), 5 deletions(-)

diffs (34 lines):

diff -r a02fae99cf9a -r dbfeea5cfe53 usr.sbin/mtree/create.c
--- a/usr.sbin/mtree/create.c   Wed Dec 12 15:46:05 2012 +0000
+++ b/usr.sbin/mtree/create.c   Wed Dec 12 15:50:35 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: create.c,v 1.65 2012/10/05 01:21:44 christos Exp $     */
+/*     $NetBSD: create.c,v 1.66 2012/12/12 15:50:35 christos Exp $     */
 
 /*-
  * Copyright (c) 1989, 1993
@@ -38,7 +38,7 @@
 #if 0
 static char sccsid[] = "@(#)create.c   8.1 (Berkeley) 6/6/93";
 #else
-__RCSID("$NetBSD: create.c,v 1.65 2012/10/05 01:21:44 christos Exp $");
+__RCSID("$NetBSD: create.c,v 1.66 2012/12/12 15:50:35 christos Exp $");
 #endif
 #endif /* not lint */
 
@@ -142,9 +142,12 @@
                        statf(indent, p);
                        break;
                case FTS_DP:
-                       if (!nflag && p->fts_level > 0)
-                               printf("%*s# %s\n%*s..\n\n", indent, "",
-                                   p->fts_path, indent, "");
+                       if (p->fts_level > 0) {
+                               if (!nflag)
+                                       printf("%*s# %s\n", indent, "",
+                                           p->fts_path);
+                               printf("%*s..\n\n", indent, "");
+                       }
                        break;
                case FTS_DNR:
                case FTS_ERR:



Home | Main Index | Thread Index | Old Index