Source-Changes-HG archive

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

[src/trunk]: src/distrib/sets Error out if a path has a trailing slash, which...



details:   https://anonhg.NetBSD.org/src/rev/579a029e78f0
branches:  trunk
changeset: 785399:579a029e78f0
user:      njoly <njoly%NetBSD.org@localhost>
date:      Tue Mar 12 13:08:00 2013 +0000

description:
Error out if a path has a trailing slash, which makes awk enter an
infinite loop while creating set lists.

diffstat:

 distrib/sets/getdirs.awk |  11 ++++++++++-
 1 files changed, 10 insertions(+), 1 deletions(-)

diffs (25 lines):

diff -r d5671f03fb4a -r 579a029e78f0 distrib/sets/getdirs.awk
--- a/distrib/sets/getdirs.awk  Tue Mar 12 01:55:33 2013 +0000
+++ b/distrib/sets/getdirs.awk  Tue Mar 12 13:08:00 2013 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: getdirs.awk,v 1.5 2012/02/08 16:51:09 njoly Exp $
+#      $NetBSD: getdirs.awk,v 1.6 2013/03/12 13:08:00 njoly Exp $
 #
 # Copyright (c) 2002 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -59,6 +59,15 @@
        exit 1
 }
 
+#      error if path has a trailing slash
+#
+/\/$/ \
+{
+       print "Unsupported path with trailing slash:" >"/dev/stderr"
+       print >"/dev/stderr"
+       exit 1
+}
+
 #      all other lines are parsed 
 #
 {



Home | Main Index | Thread Index | Old Index