diff --git a/.gitignore b/.gitignore index 63612403..4af96327 100644 --- a/.gitignore +++ b/.gitignore @@ -4,6 +4,8 @@ .#* .project .settings +**/.idea/ +**/*.iml .DS_Store /analysis/token_filters/cld2/cld2-read-only /analysis/token_filters/cld2/libcld2_full.a diff --git a/index_meta.go b/index_meta.go index a6599529..8789470a 100644 --- a/index_meta.go +++ b/index_meta.go @@ -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 {