diff options
-rw-r--r-- | perl_checker.src/info.ml | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/perl_checker.src/info.ml b/perl_checker.src/info.ml index d872ca7..ca14f9e 100644 --- a/perl_checker.src/info.ml +++ b/perl_checker.src/info.ml @@ -29,8 +29,11 @@ let file_to_absolute_file file = let absolute_file_to_file = let s1 = Filename.dirname cwd in if String.length s1 < 4 then (fun x -> x) else - let s2 = Filename.dirname s1 in - let short_cwd = if String.length s2 < 4 then s1 else s2 in + let short_cwd = + let s2 = Filename.dirname s1 in + if String.length s2 < 4 then s1 else + let s3 = Filename.dirname s2 in (* allow up to ../../../xxx *) + if String.length s3 < 4 then s2 else s3 in memoize (fun abs_file -> if str_begins_with abs_file (short_cwd ^ "/") then let rec to_file rel cwd = |