Permalink
Browse files

progname() should rely on code:priv_dir(procket)

  • Loading branch information...
1 parent 6a7723f commit 58aeeb58e7364ff5f70b345a3145868caee544fa @RGafiyatullin RGafiyatullin committed Mar 11, 2012
Showing with 9 additions and 6 deletions.
  1. +9 −6 src/procket.erl
View
@@ -273,12 +273,15 @@ is_device(Name) when is_list(Name) ->
or ((C >= $0) and (C =< $9) or (C == $/))].
progname() ->
- filename:join([
- filename:dirname(code:which(?MODULE)),
- "..",
- "priv",
- ?MODULE
- ]).
+ % Is there a proper way of getting App-Name in this context?
+ PrivD = code:priv_dir( ?MODULE ),
+ filename:join([ PrivD, ?MODULE ]).
+ % filename:join([
+ % filename:dirname(code:which(?MODULE)),
+ % "..",
+ % "priv",
+ % ?MODULE
+ % ]).
%% Protocol family (aka domain)

0 comments on commit 58aeeb5

Please sign in to comment.