aboutsummaryrefslogtreecommitdiff
path: root/vernac
diff options
context:
space:
mode:
authorEmilio Jesus Gallego Arias2019-11-21 11:05:00 +0100
committerEmilio Jesus Gallego Arias2019-11-21 11:05:00 +0100
commitb233d38a7a6a3e73f093c5c5ec00f1a7582e7668 (patch)
tree3467207f621885afcaf131295d5516dfe38ae53b /vernac
parente687dd9b1ee68b4ae00461a379a5207d6187a6d1 (diff)
parent5bf25dfce23da1cee04b1c886e026f0dbc902c9c (diff)
Merge PR #11075: load .vo when .vos is missing + misc vos changes
Reviewed-by: gares Reviewed-by: silene
Diffstat (limited to 'vernac')
-rw-r--r--vernac/loadpath.ml8
1 files changed, 3 insertions, 5 deletions
diff --git a/vernac/loadpath.ml b/vernac/loadpath.ml
index b3dc254a63..a8462e31e1 100644
--- a/vernac/loadpath.ml
+++ b/vernac/loadpath.ml
@@ -140,12 +140,10 @@ let select_vo_file ~warn loadpath base =
with Not_found -> None in
if !Flags.load_vos_libraries then begin
(* If the .vos file exists and is not empty, it describes the library.
- If the .vos file exists and is empty, then load the .vo file.
- If the .vos file is missing, then fail. *)
+ Otherwise, load the .vo file, or fail if is missing. *)
match find ".vos" with
- | None -> Error LibNotFound
- | Some (_, vos as resvos) ->
- if (Unix.stat vos).Unix.st_size > 0 then Ok resvos else
+ | Some (_, vos as resvos) when (Unix.stat vos).Unix.st_size > 0 -> Ok resvos
+ | _ ->
match find ".vo" with
| None -> Error LibNotFound
| Some resvo -> Ok resvo