Fix a problem when opam files are in sub-directories

This commit is contained in:
Jeremie Dimino 2017-03-01 18:07:16 +00:00
parent b80b3c20ce
commit 27e44cd72b
1 changed files with 1 additions and 1 deletions

View File

@ -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)