From 025d10eeb7ab3bea576b6561e523e95e0bc9bb24 Mon Sep 17 00:00:00 2001 From: Tristan Sloughter Date: Fri, 5 Feb 2016 09:24:47 -0600 Subject: targetdir may be list not binary, convert before comparing --- src/rlx_prv_assembler.erl | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src/rlx_prv_assembler.erl') diff --git a/src/rlx_prv_assembler.erl b/src/rlx_prv_assembler.erl index 8f86dde..8e0050c 100644 --- a/src/rlx_prv_assembler.erl +++ b/src/rlx_prv_assembler.erl @@ -184,12 +184,12 @@ copy_app(LibDir, App, IncludeSrc, IncludeErts) -> AppVsn = rlx_app_info:original_vsn(App), AppDir = rlx_app_info:dir(App), TargetDir = filename:join([LibDir, AppName ++ "-" ++ AppVsn]), - if - AppDir == TargetDir -> + case AppDir == ec_cnv:to_binary(TargetDir) of + true -> %% No need to do anything here, discover found something already in %% a release dir ok; - true -> + false -> case IncludeErts of false -> case is_erts_lib(AppDir) of @@ -223,7 +223,6 @@ rewrite_app_file(App, TargetDir) -> ActiveDeps = rlx_app_info:active_deps(App), IncludedDeps = rlx_app_info:library_deps(App), AppFile = filename:join([TargetDir, "ebin", ec_cnv:to_list(Name) ++ ".app"]), - {ok, [{application, AppName, AppData}]} = file:consult(AppFile), OldActiveDeps = proplists:get_value(applications, AppData, []), OldIncludedDeps = proplists:get_value(included_applications, AppData, []), -- cgit v1.2.3