mirror of
https://github.com/minio/minio.git
synced 2025-11-25 12:06:10 -05:00
XL/fs: Initialize export paths supplied on command line (#2020)
Fixes #2013
This commit is contained in:
committed by
Anand Babu (AB) Periasamy
parent
8e8f6f90a4
commit
0e3907072c
6
posix.go
6
posix.go
@@ -101,7 +101,11 @@ func newPosix(diskPath string) (StorageAPI, error) {
|
||||
st, err := os.Stat(preparePath(diskPath))
|
||||
if err != nil {
|
||||
if os.IsNotExist(err) {
|
||||
return fs, errDiskNotFound
|
||||
// Disk not found create it.
|
||||
if err = os.MkdirAll(diskPath, 0777); err != nil {
|
||||
return fs, err
|
||||
}
|
||||
return fs, nil
|
||||
}
|
||||
return fs, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user