storageminer: Correctly initialize storage.json with --no-local-storage

This commit is contained in:
Łukasz Magiera 2020-03-09 06:45:12 +01:00
parent f17962182f
commit 7c94f2f3be

View File

@ -200,11 +200,12 @@ var initCmd = &cli.Command{
if err := ioutil.WriteFile(filepath.Join(lr.Path(), "sectorstore.json"), b, 0644); err != nil {
return xerrors.Errorf("persisting storage metadata (%s): %w", filepath.Join(lr.Path(), "storage.json"), err)
}
sc.StoragePaths = append(sc.StoragePaths, config.LocalPath{
Path: lr.Path(),
})
}
sc.StoragePaths = append(sc.StoragePaths, config.LocalPath{
Path: lr.Path(),
})
if err := lr.SetStorage(sc); err != nil {
return xerrors.Errorf("set storage config: %w", err)