From 7f0771d0a9caf2d3294bfced9e66fac03334d9ba Mon Sep 17 00:00:00 2001 From: Laria Carolin Chabowski Date: Sun, 1 Oct 2017 01:07:05 +0200 Subject: Redo storage config --- storage/local/local.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'storage/local') diff --git a/storage/local/local.go b/storage/local/local.go index 4869bb2..7dc59cb 100644 --- a/storage/local/local.go +++ b/storage/local/local.go @@ -26,12 +26,13 @@ type LocalStorage struct { } func LocalStorageFromConfig(conf config.Config, name string) (storage.Storage, error) { - var path string - if err := conf.Storage[name].Get("path", &path); err != nil { + var path_wrap struct{ Path string } + + if err := conf.GetStorageConfData(name, &path_wrap); err != nil { return nil, err } - return OpenLocalStorage(config.ExpandTilde(path)) + return OpenLocalStorage(config.ExpandTilde(path_wrap.Path)) } func OpenLocalStorage(path string) (l LocalStorage, err error) { -- cgit v1.2.3-70-g09d2