storagemgr: Actually set updated config in AddLocalStorage
This commit is contained in:
parent
f17962182f
commit
4b576cde50
@ -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
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user