Merge pull request #1362 from filecoin-project/fix/no-storage-init

storageminer: Correctly initialize storage.json with --no-local-storage
This commit is contained in:
Whyrusleeping 2020-03-08 23:16:20 -07:00 committed by GitHub
commit f9c38ac35e

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)