From 4b576cde50b3f768be1735ea1673358c8e95dccb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Magiera?= Date: Mon, 9 Mar 2020 06:56:32 +0100 Subject: [PATCH] storagemgr: Actually set updated config in AddLocalStorage --- storage/sealmgr/advmgr/manager.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/storage/sealmgr/advmgr/manager.go b/storage/sealmgr/advmgr/manager.go index 675a6ffe1..9a7bb63c1 100644 --- a/storage/sealmgr/advmgr/manager.go +++ b/storage/sealmgr/advmgr/manager.go @@ -96,12 +96,18 @@ func (m *Manager) AddLocalStorage(path string) error { return xerrors.Errorf("opening local path: %w", err) } + // TODO: Locks! + sc, err := m.storage.localStorage.GetStorage() if err != nil { return xerrors.Errorf("get storage config: %w", err) } sc.StoragePaths = append(sc.StoragePaths, config.LocalPath{Path: path}) + + if err := m.storage.localStorage.SetStorage(sc); err != nil { + return xerrors.Errorf("get storage config: %w", err) + } return nil }