retitle 69045 libc6: [PATCH] tzconfig doesn't allow choices that are substrings of 
other choices.
thanks

[Rebeka Thomas <[EMAIL PROTECTED]>]
> this should be easy to fix by adding a check to see if the typed
> string is a full valid choice BEFORE checking for ambiguity.

Lightly tested, seems to work..

Peter

--- tzconfig~   Wed Apr 26 20:01:45 2000
+++ tzconfig    Sun Aug 13 00:54:07 2000
@@ -97,6 +97,13 @@
 
 while [ $valid = no ]; do
        if [ -n "$zone" ]; then
+               # in case of ambiguity, exact match wins
+               if grep -q -i "^$continent/$zone\$" $TIMEZONES; then
+                       timezone=`grep -i "^$continent/$zone\$" $TIMEZONES`
+                       zone_info
+                       valid=yes
+                       break
+               fi
                number=`grep -i -c "^$continent/$zone" $TIMEZONES`
                if [ $number -eq 1 ]; then
                        timezone=`grep -i "^$continent/$zone" $TIMEZONES`


--  
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to