From 69e4520422321a87b78af1b2210efe503fa9e1ed Mon Sep 17 00:00:00 2001 From: apb Date: Wed, 13 Jul 2011 07:48:19 +0000 Subject: [PATCH] Fix error in previous: The first character of $i should be removed only if it is '!', but it was removed in the wrong case branch. --- usr.bin/locate/locate/updatedb.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/usr.bin/locate/locate/updatedb.sh b/usr.bin/locate/locate/updatedb.sh index 30ed69a1828e..c90e819afef1 100644 --- a/usr.bin/locate/locate/updatedb.sh +++ b/usr.bin/locate/locate/updatedb.sh @@ -1,6 +1,6 @@ #!/bin/sh # -# $NetBSD: updatedb.sh,v 1.12 2011/07/10 13:42:49 apb Exp $ +# $NetBSD: updatedb.sh,v 1.13 2011/07/13 07:48:19 apb Exp $ # # Copyright (c) 1989, 1993 # The Regents of the University of California. All rights reserved. @@ -89,11 +89,12 @@ if [ -f "$CONF" ]; then SRCHPATHS="${SRCHPATHS}${SRCHPATHS:+ }$(shell_quote "$@")";; ignorefs) for i in "$@"; do + q="$(shell_quote "${i#\!}")" fs= case "$i" in none) ignorefs=;; - \!*) fs="! -fstype $(shell_quote "$i")";; - *) fs="-fstype $(shell_quote "${i#?}")";; + \!*) fs="! -fstype $q";; + *) fs="-fstype $q";; esac case "$fs" in '') ;;