X-Git-Url: https://git.enpas.org/?a=blobdiff_plain;f=tools%2Fejabberd2prosody.lua;h=858d78bb54e6d5687b6eea97d6a61ee64fceb2cd;hb=88e5c422ce6f04b5961af13f1804f4d31d5464f2;hp=3c3ce9459fca2167b4175bc2788bee0dab3ab3b3;hpb=5466de23f56d2121e384f47fe14f32b4ff5ed587;p=prosody.git diff --git a/tools/ejabberd2prosody.lua b/tools/ejabberd2prosody.lua index 3c3ce945..858d78bb 100755 --- a/tools/ejabberd2prosody.lua +++ b/tools/ejabberd2prosody.lua @@ -37,7 +37,7 @@ function mkdir(path) --print("mkdir",path); local x = io.popen("mkdir "..path.." 2>&1"):read("*a"); end -function encode(s) return s and (s:gsub("%W", function (c) return string.format("%%%x", c:byte()); end)); end +function encode(s) return s and (s:gsub("%W", function (c) return string.format("%%%02x", c:byte()); end)); end function getpath(username, host, datastore, ext) ext = ext or "dat"; if username then