make sure library_path is initialised at boot time, so that people get no

surprises.
This commit is contained in:
Vítor Santos Costa 2012-07-06 18:49:02 -05:00
parent 97163fa150
commit f166b8bfb6
2 changed files with 11 additions and 8 deletions

View File

@ -109,7 +109,16 @@ true :- true.
nb_setval('$consulting_file',[]),
nb_setval('$initialization_goals',off),
nb_setval('$consulting',false),
nb_setval('$included_file',[]).
nb_setval('$included_file',[]),
fail.
'$init_consult' :-
retractall(user:library_directory(_)),
% make sure library_directory is open.
\+ clause(user:library_directory(_),_),
'$system_library_directories'(D),
assert(user:library_directory(D)),
fail.
'$init_consult'.
'$init_or_threads' :-
'$c_yapor_workers'(W), !,

View File

@ -769,12 +769,6 @@ absolute_file_name(File,Opts,TrueFileName) :-
% all must try search in path
'$find_in_path'(user,_,user_input, _) :- !.
'$find_in_path'(user_input,_,user_input, _) :- !.
'$find_in_path'(library(F0),_,_, _) :-
% make sure library_directory is open.
\+ clause(user:library_directory(_),_),
'$system_library_directories'(D),
assert(user:library_directory(D)),
fail.
'$find_in_path'(commons(F0),_,_, _) :-
% make sure library_directory is open.
\+ clause(user:commons_directory(_),_),