Skip to content

Commit

Permalink
Allow indexing outside notebook directory
Browse files Browse the repository at this point in the history
Fixes: zk-org#89
  • Loading branch information
adamreese committed Oct 18, 2021
1 parent 9bd2eac commit a6ee424
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 2 deletions.
7 changes: 6 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,12 @@

All notable changes to this project will be documented in this file.

<!--## Unreleased-->
## 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

Expand Down
18 changes: 18 additions & 0 deletions changelog.patch.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
diff --git a/CHANGELOG.md b/CHANGELOG.md
index d68bec9..3100351 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,7 +2,12 @@

All notable changes to this project will be documented in this file.

-<!--## Unreleased-->
+## 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

2 changes: 1 addition & 1 deletion internal/core/note_index.go
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit a6ee424

Please sign in to comment.