Author: Kevin Schoon [kevinschoon@gmail.com]
Hash: 4910d53f04a3ce194ce0b1231d89cc4e41e50560
Timestamp: Thu, 01 Jul 2021 16:18:04 +0000 (3 years ago)

+2 -0 +/-2 browse
fix relative path on create
1diff --git a/lib/manifest.ml b/lib/manifest.ml
2index 7f489b1..f2a0fcc 100644
3--- a/lib/manifest.ml
4+++ b/lib/manifest.ml
5 @@ -107,6 +107,7 @@ let find ~path manifest =
6
7 (* TODO: no support for recursive operations yet *)
8 let create ~path manifest =
9+ let path = path |> Util.fixpath in
10 if
11 Option.is_some
12 (manifest.items
13 diff --git a/lib/note.ml b/lib/note.ml
14index bbecba2..ca90229 100644
15--- a/lib/note.ml
16+++ b/lib/note.ml
17 @@ -179,6 +179,7 @@ module Adapter = struct
18 let manifest = options.state_dir |> Manifest.load_or_init in
19 let manifest = manifest |> Manifest.create ~path in
20 let item = manifest.items |> List.hd_exn in
21+ let path = item.path in
22 let slug = item.slug in
23 (match content with
24 | Some content ->