Remove the space when inserting the first element in a list. Closes #469
authorFlorian Fainelli <florian@openwrt.org>
Fri, 14 Apr 2006 14:44:54 +0000 (14:44 +0000)
committerFlorian Fainelli <florian@openwrt.org>
Fri, 14 Apr 2006 14:44:54 +0000 (14:44 +0000)
SVN-Revision: 3651

openwrt/package/webif/files/usr/lib/webif/webif.sh

index cdf235889d37d53c6e42ef2fc23b5998f3364f5c..a81c245742e30b4929ee655a3f3fc9a052029c18 100644 (file)
@@ -240,7 +240,11 @@ handle_list() {
        
        empty "$3" || {
                validate "${4:-none}|$2" && {
-                       LISTVAL="$LISTVAL $2"
+                       if empty "$LISTVAL"; then
+                               LISTVAL="$2"
+                       else
+                               LISTVAL="$LISTVAL $2"
+                       fi
                        _changed=1
                }
        }