Commit fb0939f3 authored by yoogx's avatar yoogx

* Always consider Ocarina default library last when looking

          for files

          For openaadl/ocarina#254
parent 7ca592fc
......@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
-- Copyright (C) 2008-2009 Telecom ParisTech, 2010-2017 ESA & ISAE. --
-- Copyright (C) 2008-2009 Telecom ParisTech, 2010-2020 ESA & ISAE. --
-- --
-- Ocarina is free software; you can redistribute it and/or modify under --
-- terms of the GNU General Public License as published by the Free Soft- --
......@@ -224,6 +224,17 @@ package body Ocarina.Files is
return Name_Find;
end if;
end loop;
-- Check in default library path last in case the user wants
-- to override some packages.
Get_Name_String (Default_Library_Path);
Add_Char_To_Name_Buffer (Directory_Separator);
Get_Name_String_And_Append (Base_File_Name_N);
if Is_Regular_File (Name_Buffer (1 .. Name_Len)) then
return Name_Find;
end if;
end;
return No_Name;
......
......@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
-- Copyright (C) 2008-2009 Telecom ParisTech, 2010-2016 ESA & ISAE. --
-- Copyright (C) 2008-2009 Telecom ParisTech, 2010-2020 ESA & ISAE. --
-- --
-- Ocarina is free software; you can redistribute it and/or modify under --
-- terms of the GNU General Public License as published by the Free Soft- --
......@@ -40,7 +40,6 @@ with Ocarina.ME_AADL.AADL_Tree.Nodes; use Ocarina.ME_AADL.AADL_Tree.Nodes;
with Ocarina.Files; use Ocarina.Files;
with Ocarina.ME_AADL.AADL_Tree.Nutils; use Ocarina.ME_AADL.AADL_Tree.Nutils;
with Ocarina.Options; use Ocarina.Options;
with Ocarina.Parser; use Ocarina.Parser;
with Ocarina.Property_Sets; use Ocarina.Property_Sets;
......@@ -74,8 +73,6 @@ package body Ocarina.FE_AADL.Parser is
procedure Init is
begin
First_Parsing := True;
Add_Library_Path (Get_Name_String (Default_Library_Path));
Ocarina.Parser.Register_Parser (Language, Process'Access);
end Init;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment