From 27e44cd72b5061d2a70ca13a8588e02e73154897 Mon Sep 17 00:00:00 2001 From: Jeremie Dimino Date: Wed, 1 Mar 2017 18:07:16 +0000 Subject: [PATCH] Fix a problem when opam files are in sub-directories --- src/jbuild_load.ml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/jbuild_load.ml b/src/jbuild_load.ml index bec1236d..74280c6f 100644 --- a/src/jbuild_load.ml +++ b/src/jbuild_load.ml @@ -150,7 +150,7 @@ let load () = match Filename.split_ext fn with | Some (pkg, ".opam") -> let version_from_opam_file = - let lines = lines_of_file fn in + let lines = lines_of_file (Path.relative path fn |> Path.to_string) in List.find_map lines ~f:(fun s -> try Scanf.sscanf s "version: %S" (fun x -> Some x)