Merge pull request #823 from filecoin-project/fix/badger-read-only
make badger readonly when initializing storage miner from sector set
This commit is contained in:
commit
3f021a0aa4
@ -179,7 +179,7 @@ var aggregateSectorDirsCmd = &cli.Command{
|
||||
return err
|
||||
}
|
||||
|
||||
if err := os.MkdirAll(cctx.String("dest"), 0755); err != nil {
|
||||
if err := os.MkdirAll(destdir, 0755); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
|
@ -153,7 +153,9 @@ var initCmd = &cli.Command{
|
||||
return err
|
||||
}
|
||||
|
||||
oldmds, err := badger.NewDatastore(filepath.Join(pssb, "badger"), nil)
|
||||
bopts := badger.DefaultOptions
|
||||
bopts.ReadOnly = true
|
||||
oldmds, err := badger.NewDatastore(filepath.Join(pssb, "badger"), &bopts)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user