From b9ec30ebdb94dc6fe6d5d62ff702a78bfc6b6863 Mon Sep 17 00:00:00 2001 From: filoozom Date: Tue, 4 Mar 2014 11:29:51 +0100 Subject: [PATCH] Update config.go --- cmd/syncthing/config.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/syncthing/config.go b/cmd/syncthing/config.go index dc24c098..8715f1f9 100644 --- a/cmd/syncthing/config.go +++ b/cmd/syncthing/config.go @@ -46,7 +46,7 @@ type OptionsConfiguration struct { MaxChangeKbps int `xml:"maxChangeKbps" default:"1000" ini:"max-change-bw"` } -func setDefaults(data interface{}, setNilSlices bool) error { +func setDefaults(data interface{}, setEmptySlices bool) error { s := reflect.ValueOf(data).Elem() t := s.Type() @@ -66,7 +66,7 @@ func setDefaults(data interface{}, setNilSlices bool) error { f.SetString(v) case []string: - if setNilSlices { + if setEmptySlices { rv := reflect.MakeSlice(reflect.TypeOf([]string{}), 1, 1) rv.Index(0).SetString(v) f.Set(rv)