Merge pull request #355 from MachineShop-IOT/master
Minor fix to ensure full index path exists
This commit is contained in:
commit
0a343acb0d
@ -56,7 +56,7 @@ func openIndexMeta(path string) (*indexMeta, error) {
|
|||||||
func (i *indexMeta) Save(path string) (err error) {
|
func (i *indexMeta) Save(path string) (err error) {
|
||||||
indexMetaPath := indexMetaPath(path)
|
indexMetaPath := indexMetaPath(path)
|
||||||
// ensure any necessary parent directories exist
|
// ensure any necessary parent directories exist
|
||||||
err = os.Mkdir(path, 0700)
|
err = os.MkdirAll(path, 0700)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
if os.IsExist(err) {
|
if os.IsExist(err) {
|
||||||
return ErrorIndexPathExists
|
return ErrorIndexPathExists
|
||||||
|
Loading…
Reference in New Issue
Block a user