Skip to content

Commit cc8611b

Browse files
committed
[hl] use classpaths relative_path for get_relative_path
1 parent c11b679 commit cc8611b

File tree

1 file changed

+2
-12
lines changed

1 file changed

+2
-12
lines changed

src/generators/genhl.ml

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -333,18 +333,8 @@ let make_debug ctx arr =
333333
| true -> if (Filename.is_relative p.pfile)
334334
then Filename.concat (Sys.getcwd()) p.pfile
335335
else p.pfile
336-
| false -> try
337-
(* lookup relative path *)
338-
let len = String.length p.pfile in
339-
let base = ctx.com.class_paths#find (fun path ->
340-
let path = path#path in
341-
let l = String.length path in
342-
len > l && String.sub p.pfile 0 l = path
343-
) in
344-
let l = String.length base#path in
345-
String.sub p.pfile l (len - l)
346-
with Not_found ->
347-
p.pfile
336+
| false ->
337+
ctx.com.class_paths#relative_path p.pfile
348338
in
349339
let pos = ref (0,0,Globals.null_pos) in
350340
let cur_file = ref 0 in

0 commit comments

Comments
 (0)