Fix plugin load bug
This commit is contained in:
parent
3ece73b912
commit
fc6f54602d
|
@ -271,7 +271,7 @@ plugin_loaded(Name, true) ->
|
||||||
case lists:member(Name, Names) of
|
case lists:member(Name, Names) of
|
||||||
false ->
|
false ->
|
||||||
%% write file if plugin is loaded
|
%% write file if plugin is loaded
|
||||||
write_loaded(lists:append(Names, [Name]));
|
write_loaded(lists:append(Names, [{Name, true}]));
|
||||||
true ->
|
true ->
|
||||||
ignore
|
ignore
|
||||||
end;
|
end;
|
||||||
|
@ -308,7 +308,7 @@ write_loaded(AppNames) ->
|
||||||
case file:open(File, [binary, write]) of
|
case file:open(File, [binary, write]) of
|
||||||
{ok, Fd} ->
|
{ok, Fd} ->
|
||||||
lists:foreach(fun(Name) ->
|
lists:foreach(fun(Name) ->
|
||||||
file:write(Fd, iolist_to_binary(io_lib:format("~s.~n", [Name])))
|
file:write(Fd, iolist_to_binary(io_lib:format("~p.~n", [Name])))
|
||||||
end, AppNames);
|
end, AppNames);
|
||||||
{error, Error} ->
|
{error, Error} ->
|
||||||
?LOG(error, "[Plugins] Open File ~p Error: ~p", [File, Error]),
|
?LOG(error, "[Plugins] Open File ~p Error: ~p", [File, Error]),
|
||||||
|
|
Loading…
Reference in New Issue