Commit 3a3b3101 authored by hugues.jerome's avatar hugues.jerome

* (Init_Modules): check ocarina binary is actually in the bin/

	 subdirectory of the directory returned by Get_Install_Dir;
	 raise an error if OCARNA_PATH is set, and ocarina binary is
	 not in $OCARINA_PATH/bin



git-svn-id: https://tecsw.estec.esa.int/svn/taste/trunk/ocarina@1471 129961e7-ef38-4bb5-a8f7-c9a525a55882
parent ef1ab1b6
......@@ -149,6 +149,10 @@ package body Ocarina.Configuration is
:= Normalize_Pathname (Path.all) & Directory_Separator;
begin
if Dir'Length > 0 then
if not Is_Regular_File (Dir & "bin/" & Command_Name) then
raise Program_Error with "Wrong value for OCARINA_PATH";
end if;
Set_Str_To_Name_Buffer (Dir);
Installation_Directory := Name_Find;
end if;
......@@ -165,7 +169,9 @@ package body Ocarina.Configuration is
declare
Dir : constant String := Get_Install_Dir (Exec);
begin
if Dir'Length > 0 then
if Dir'Length > 0
and then Is_Regular_File (Dir & "bin/" & Command_Name)
then
Set_Str_To_Name_Buffer (Dir);
Installation_Directory := Name_Find;
end if;
......
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