summaryrefslogtreecommitdiff
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:58:58 +0100
commit919cdc27dba1b3c1c0a1f68d329815439f021321 (patch)
tree14f7ea7fdacc562a58123929e476b53cab72c32d
parentSupport Erlang/OTP R15B driver (EJAB-1521) (diff)
Fix update with stripped beams (thanks to Jose M Herrero)(EJAB-1520)
-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 6bb35481..c6aed4db 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) ->