0
0
Fork 0

Fix masking of error when creating index

This commit is contained in:
Mark Mindenhall 2016-02-17 10:31:27 -07:00
parent 1006bf54b4
commit bae3db1c55
2 changed files with 6 additions and 1 deletions

2
.gitignore vendored
View File

@ -4,6 +4,8 @@
.#*
.project
.settings
**/.idea/
**/*.iml
.DS_Store
/analysis/token_filters/cld2/cld2-read-only
/analysis/token_filters/cld2/libcld2_full.a

View File

@ -58,7 +58,10 @@ func (i *indexMeta) Save(path string) (err error) {
// ensure any necessary parent directories exist
err = os.Mkdir(path, 0700)
if err != nil {
return ErrorIndexPathExists
if os.IsExist(err) {
return ErrorIndexPathExists
}
return err
}
metaBytes, err := json.Marshal(i)
if err != nil {