Merge pull request #340 from MachineShop-IOT/master
Fix masking of error when creating index (minor error reporting fix)
This commit is contained in:
commit
1af0568036
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -4,6 +4,8 @@
|
||||||
.#*
|
.#*
|
||||||
.project
|
.project
|
||||||
.settings
|
.settings
|
||||||
|
**/.idea/
|
||||||
|
**/*.iml
|
||||||
.DS_Store
|
.DS_Store
|
||||||
/analysis/token_filters/cld2/cld2-read-only
|
/analysis/token_filters/cld2/cld2-read-only
|
||||||
/analysis/token_filters/cld2/libcld2_full.a
|
/analysis/token_filters/cld2/libcld2_full.a
|
||||||
|
|
|
@ -58,7 +58,10 @@ func (i *indexMeta) Save(path string) (err error) {
|
||||||
// ensure any necessary parent directories exist
|
// ensure any necessary parent directories exist
|
||||||
err = os.Mkdir(path, 0700)
|
err = os.Mkdir(path, 0700)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return ErrorIndexPathExists
|
if os.IsExist(err) {
|
||||||
|
return ErrorIndexPathExists
|
||||||
|
}
|
||||||
|
return err
|
||||||
}
|
}
|
||||||
metaBytes, err := json.Marshal(i)
|
metaBytes, err := json.Marshal(i)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user