Permalink
Browse files

[enhance] ocamllib: File.get_one_location will not show duplicate loc…

…ations
  • Loading branch information...
Aqua-Ye committed Jan 15, 2013
1 parent ae4563f commit 13afae4b6a6a6c0ee9e2e9ae5cf8e714c31578ef
Showing with 2 additions and 1 deletion.
  1. +2 −1 ocamllib/libbase/file.ml
View
@@ -1,5 +1,5 @@
(*
- Copyright © 2011, 2012 MLstate
+ Copyright © 2011, 2012, 2013 MLstate
This file is part of Opa.
@@ -674,6 +674,7 @@ let get_one_location ?dir
)
directories filename =
let found_files = get_locations ?dir directories filename in
+ let found_files = List.uniq_unsorted found_files in
match found_files with
| [fullname] -> fullname
| [] -> missing_file directories filename

0 comments on commit 13afae4

Please sign in to comment.