Skip to content

Commit

Permalink
S308-026 be more forgiving with relative paths in search dirs
Browse files Browse the repository at this point in the history
We should only get absolute library paths in search dirs, but
sometimes we currently get ./../lib. Accept this case

Change-Id: I8c0710dcbe9c2c8690070a190f16c84025559dc3
  • Loading branch information
yakobowski committed Jan 4, 2022
1 parent 3255266 commit 0ec6082
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion reloc.ml
Original file line number Diff line number Diff line change
Expand Up @@ -1217,7 +1217,11 @@ let normalize_path path =
let rec loop acc path =
match path with
| "." :: path -> loop acc path
| ".." :: path -> loop (List.tl acc) path
| ".." :: path -> begin
match acc with
| ".." :: _ | [] -> loop (".." :: acc) path
| _ :: acc -> loop acc path
end
| elem :: path -> loop (elem :: acc) path
| [] -> List.rev acc
in
Expand Down

0 comments on commit 0ec6082

Please sign in to comment.