File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -103,12 +103,20 @@ struct
103103 let is_directory ~on path =
104104 match on with
105105 | `Source -> Source. lift @@ Source. is_directory ~on path
106- | `Target -> Lwt. return true
106+ | `Target ->
107+ let open Lwt.Syntax in
108+ let + k = Store. exists store (to_kv_path path) in
109+ Ok (k = Ok (Some `Dictionary ))
110+ |> Result. fold ~ok: Fun. id ~error: (Fun. const false )
107111
108112 let is_file ~on path =
109113 match on with
110114 | `Source -> Source. lift @@ Source. is_file ~on path
111- | `Target -> Lwt. return true
115+ | `Target ->
116+ let open Lwt.Syntax in
117+ let + k = Store. exists store (to_kv_path path) in
118+ Ok (k = Ok (Some `Value ))
119+ |> Result. fold ~ok: Fun. id ~error: (Fun. const false )
112120
113121 let exec ?is_success prog args =
114122 lift_result @@ Source. exec ?is_success prog args
You can’t perform that action at this time.
0 commit comments