aboutsummaryrefslogtreecommitdiffstats
path: root/lib/wx/src/wxe_util.erl
diff options
context:
space:
mode:
authorDan Gudmundsson <[email protected]>2013-01-15 09:19:09 +0100
committerDan Gudmundsson <[email protected]>2013-01-15 09:19:09 +0100
commit364ec900a6f974e7bc184bb3d5d67e85765353e0 (patch)
tree2e8eb3e5ed0bb93c7cae7e5f5cf4aeb3662df436 /lib/wx/src/wxe_util.erl
parent0e044f3525d22de4c4c471f601de50ad3acda304 (diff)
parent54933c352a9e8fd29f38f72487394d8f6fa7a2b7 (diff)
downloadotp-364ec900a6f974e7bc184bb3d5d67e85765353e0.tar.gz
otp-364ec900a6f974e7bc184bb3d5d67e85765353e0.tar.bz2
otp-364ec900a6f974e7bc184bb3d5d67e85765353e0.zip
Merge branch 'dgud/wx/platform-gen'
* dgud/wx/platform-gen: wx: Build targets to platform subdirs
Diffstat (limited to 'lib/wx/src/wxe_util.erl')
-rw-r--r--lib/wx/src/wxe_util.erl16
1 files changed, 11 insertions, 5 deletions
diff --git a/lib/wx/src/wxe_util.erl b/lib/wx/src/wxe_util.erl
index 3022b7f3f2..a31c3e30b8 100644
--- a/lib/wx/src/wxe_util.erl
+++ b/lib/wx/src/wxe_util.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2010. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -233,10 +233,16 @@ priv_dir(Driver0, Silent) ->
{ok, _} ->
Priv;
{error, _} ->
- opt_error_log(Silent,
- "ERROR: Could not find \'~s\' in: ~s~n",
- [Driver, Priv]),
- erlang:error({load_driver, "No driver found"})
+ SrcPriv = filename:join(Priv, erlang:system_info(system_architecture)),
+ case file:read_file_info(filename:join(SrcPriv, Driver)) of
+ {ok, _} ->
+ SrcPriv;
+ {error, _} ->
+ opt_error_log(Silent,
+ "ERROR: Could not find \'~s\' in: ~s~n",
+ [Driver, Priv]),
+ erlang:error({load_driver, "No driver found"})
+ end
end.
strip(Src, Src) ->