diff --git a/distrib/sets/getdirs.awk b/distrib/sets/getdirs.awk index f82e6a2a6a90..869b203f4a4b 100644 --- a/distrib/sets/getdirs.awk +++ b/distrib/sets/getdirs.awk @@ -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 @@ function dirname(file) \ 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 # {