Skip to content

Commit

Permalink
[patch] 🐛 fix behavior when index path is empty (#596)
Browse files Browse the repository at this point in the history
Signed-off-by: Rintaro Okamura <rintaro.okamura@gmail.com>
  • Loading branch information
rinx committed Jul 28, 2020
1 parent 4cf5754 commit 12db552
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/agent/core/ngt/service/option.go
Expand Up @@ -66,6 +66,10 @@ func WithEnableInMemoryMode(enabled bool) Option {

func WithIndexPath(path string) Option {
return func(n *ngt) error {
if path == "" {
return nil
}

n.path = filepath.Clean(strings.TrimSuffix(path, "/"))

return nil
Expand Down

0 comments on commit 12db552

Please sign in to comment.