XL/fs: Initialize export paths supplied on command line (#2020)

Fixes #2013
This commit is contained in:
Harshavardhana
2016-06-29 03:13:44 -07:00
committed by Anand Babu (AB) Periasamy
parent 8e8f6f90a4
commit 0e3907072c
6 changed files with 101 additions and 4 deletions

View File

@@ -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
}