storageminer: Create dir with --init
This commit is contained in:
parent
24956a49f4
commit
0c3f4eb7dd
@ -65,6 +65,12 @@ var storageAttachCmd = &cli.Command{
|
||||
}
|
||||
|
||||
if cctx.Bool("init") {
|
||||
if err := os.MkdirAll(p, 0755); err != nil {
|
||||
if !os.IsExist(err) {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
_, err := os.Stat(filepath.Join(p, metaFile))
|
||||
if !os.IsNotExist(err) {
|
||||
if err == nil {
|
||||
|
Loading…
Reference in New Issue
Block a user