]> granicus.if.org Git - ejabberd/commitdiff
list_to_integer/2 only works in OTP R14 and newer
authorBadlop <badlop@process-one.net>
Tue, 25 Jun 2013 08:37:10 +0000 (10:37 +0200)
committerBadlop <badlop@process-one.net>
Tue, 25 Jun 2013 08:37:10 +0000 (10:37 +0200)
src/mod_muc/mod_muc_log.erl

index e4b355924f99ed15281c39de043fe8a5bb123531..d3ba8fd68a9a6efd0741b3e33faddcb6c698bfaf 100644 (file)
@@ -322,9 +322,15 @@ htmlize_nick(Nick1, html) ->
 htmlize_nick(Nick1, plaintext) ->
     htmlize(?PLAINTEXT_IN++Nick1++?PLAINTEXT_OUT, plaintext).
 
+%% list_to_integer/2 was introduced in OTP R14
+-ifdef(SSL40).
 set_filemode(Fn, {FileMode, FileGroup}) ->
     ok = file:change_mode(Fn, list_to_integer(integer_to_list(FileMode), 8)),
     ok = file:change_group(Fn, FileGroup).
+-else.
+set_filemode(Fn, {_FileMode, FileGroup}) ->
+    ok = file:change_group(Fn, FileGroup).
+-endif.
 
 add_message_to_log(Nick1, Message, RoomJID, Opts, State) ->
     #logstate{out_dir = OutDir,