Bug#69045: tzconfig doesn't allow choices that are substrings of other choices.
retitle 69045 libc6: [PATCH] tzconfig doesn't allow choices that are substrings of other choices.
thanks
[Rebeka Thomas <beka_thomas@yahoo.com>]
> 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`
Reply to: