aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--stm/stm.ml4
1 files changed, 2 insertions, 2 deletions
diff --git a/stm/stm.ml b/stm/stm.ml
index 6f7cefb582..c8278fee73 100644
--- a/stm/stm.ml
+++ b/stm/stm.ml
@@ -2693,8 +2693,8 @@ let dirpath_of_file f =
Loadpath.logical lp
with Not_found -> Libnames.default_root_prefix
in
- let file = Filename.chop_extension (Filename.basename f) in
- let id = Id.of_string file in
+ let f = try Filename.chop_extension (Filename.basename f) with Invalid_argument _ -> f in
+ let id = Id.of_string f in
let ldir = Libnames.add_dirpath_suffix ldir0 id in
ldir