Use filename join to create nif loading path
This commit is contained in:
@@ -35,11 +35,12 @@
|
|||||||
-on_load(init/0).
|
-on_load(init/0).
|
||||||
|
|
||||||
init() ->
|
init() ->
|
||||||
PrivDir = case code:priv_dir(esqlite) of
|
NifName = "esqlite3_nif",
|
||||||
{error, bad_name} -> "./priv";
|
NifFileName = case code:priv_dir(esqlite) of
|
||||||
Dir -> Dir
|
{error, bad_name} -> filename:join("priv", NifName);
|
||||||
|
Dir -> filename:join(Dir, NifName)
|
||||||
end,
|
end,
|
||||||
ok = erlang:load_nif(PrivDir ++ "/esqlite3_nif", 0).
|
ok = erlang:load_nif(NifFileName, 0).
|
||||||
|
|
||||||
%% @doc Start a low level thread which will can handle sqlite3 calls.
|
%% @doc Start a low level thread which will can handle sqlite3 calls.
|
||||||
%%
|
%%
|
||||||
|
|||||||
Reference in New Issue
Block a user