mirror of
https://github.com/simon-ding/polaris.git
synced 2026-06-07 10:37:39 +08:00
fix: mkdir
This commit is contained in:
@@ -16,9 +16,7 @@ type Storage interface {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func NewLocalStorage(dir string) (*LocalStorage, error) {
|
func NewLocalStorage(dir string) (*LocalStorage, error) {
|
||||||
if _, err := os.Stat(dir); err != nil {
|
os.MkdirAll(dir, 0655)
|
||||||
return nil, errors.Wrap(err, "stat")
|
|
||||||
}
|
|
||||||
|
|
||||||
return &LocalStorage{dir: dir}, nil
|
return &LocalStorage{dir: dir}, nil
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user