Module Name:    src
Committed By:   apb
Date:           Wed Jul 13 07:48:19 UTC 2011

Modified Files:
        src/usr.bin/locate/locate: updatedb.sh

Log Message:
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.


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/usr.bin/locate/locate/updatedb.sh

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/usr.bin/locate/locate/updatedb.sh
diff -u src/usr.bin/locate/locate/updatedb.sh:1.12 src/usr.bin/locate/locate/updatedb.sh:1.13
--- src/usr.bin/locate/locate/updatedb.sh:1.12	Sun Jul 10 13:42:49 2011
+++ src/usr.bin/locate/locate/updatedb.sh	Wed Jul 13 07:48:19 2011
@@ -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 @@
 			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
 				'')	;;

Reply via email to