25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-11-24 16:23:40 +01:00

list_to_integer/2 only works in OTP R14 and newer

This commit is contained in:
Badlop 2013-02-21 13:17:25 +01:00
parent 907e239d4e
commit 9c41abde10

View File

@ -321,9 +321,15 @@ htmlize_nick(Nick1, html) ->
htmlize_nick(Nick1, plaintext) -> htmlize_nick(Nick1, plaintext) ->
htmlize(?PLAINTEXT_IN++Nick1++?PLAINTEXT_OUT, plaintext). htmlize(?PLAINTEXT_IN++Nick1++?PLAINTEXT_OUT, plaintext).
%% list_to_integer/2 was introduced in OTP R14
-ifdef(SSL40).
set_filemode(Fn, {FileMode, FileGroup}) -> set_filemode(Fn, {FileMode, FileGroup}) ->
ok = file:change_mode(Fn, list_to_integer(integer_to_list(FileMode), 8)), ok = file:change_mode(Fn, list_to_integer(integer_to_list(FileMode), 8)),
ok = file:change_group(Fn, FileGroup). 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) -> add_message_to_log(Nick1, Message, RoomJID, Opts, State) ->
#logstate{out_dir = OutDir, #logstate{out_dir = OutDir,