diff options
Diffstat (limited to 'modules/setting')
-rw-r--r-- | modules/setting/storage.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/setting/storage.go b/modules/setting/storage.go index ab0598ccf8..e743d6c20c 100644 --- a/modules/setting/storage.go +++ b/modules/setting/storage.go @@ -21,7 +21,7 @@ type Storage struct { // MapTo implements the Mappable interface func (s *Storage) MapTo(v interface{}) error { - pathValue := reflect.ValueOf(v).FieldByName("Path") + pathValue := reflect.ValueOf(v).Elem().FieldByName("Path") if pathValue.IsValid() && pathValue.Kind() == reflect.String { pathValue.SetString(s.Path) } @@ -46,7 +46,7 @@ func getStorage(name, typ string, overrides ...*ini.Section) Storage { var storage Storage - storage.Type = sec.Key("STORAGE_TYPE").MustString("") + storage.Type = sec.Key("STORAGE_TYPE").MustString(typ) storage.ServeDirect = sec.Key("SERVE_DIRECT").MustBool(false) // Global Defaults |