aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBadlop <badlop@process-one.net>2011-12-21 12:58:58 +0100
committerBadlop <badlop@process-one.net>2011-12-21 12:59:56 +0100
commit33973677f25b6107dba2817afddc096370d52b42 (patch)
tree1aa4deed92e93b6fa563dd39c198c76552ad62fa /src
parentSupport Erlang/OTP R15B driver (EJAB-1521) (diff)
Fix update with stripped beams (thanks to Jose M Herrero)(EJAB-1520)
Diffstat (limited to 'src')
-rw-r--r--src/ejabberd_update.erl6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/ejabberd_update.erl b/src/ejabberd_update.erl
index 6bb354818..c6aed4db8 100644
--- a/src/ejabberd_update.erl
+++ b/src/ejabberd_update.erl
@@ -128,8 +128,10 @@ get_new_version(Module) ->
get_current_version(Module) ->
Attrs = Module:module_info(attributes),
- {value, {vsn, CurVsn}} = lists:keysearch(vsn, 1, Attrs),
- CurVsn.
+ case lists:keysearch(vsn, 1, Attrs) of
+ {value, {vsn, CurVsn}} -> CurVsn;
+ _ -> unknown_version
+ end.
%% @spec(Dir::string(), UpdatedBeams::[atom()]) -> {Script,LowLevelScript,Check}
build_script(Dir, UpdatedBeams) ->