diff --git a/CHANGELOG.md b/CHANGELOG.md index d68bec93..3100351a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,12 @@ All notable changes to this project will be documented in this file. - +## Unreleased + +### Fixed + +* [#89](https://github.com/mickael-menu/zk/issues/89) Calling `zk index` from outside the notebook (contributed by [@adamreese](https://github.com/mickael-menu/zk/pull/90)). + ## 0.7.0 diff --git a/internal/core/note_index.go b/internal/core/note_index.go index a4988ace..d958617f 100644 --- a/internal/core/note_index.go +++ b/internal/core/note_index.go @@ -123,7 +123,7 @@ func (t *indexTask) execute(callback func(change paths.DiffChange)) (NoteIndexin // FIXME: Use the FS? count, err := paths.Diff(source, target, force, func(change paths.DiffChange) error { callback(change) - absPath := filepath.Join(change.Path) + absPath := filepath.Join(t.path, change.Path) switch change.Kind { case paths.DiffAdded: