Second merge from waqas
[prosody.git] / tools / ejabberd2prosody.lua
index 3c3ce9459fca2167b4175bc2788bee0dab3ab3b3..858d78bb54e6d5687b6eea97d6a61ee64fceb2cd 100755 (executable)
@@ -37,7 +37,7 @@ function mkdir(path)
        --print("mkdir",path);\r
        local x = io.popen("mkdir "..path.." 2>&1"):read("*a");\r
 end\r
-function encode(s) return s and (s:gsub("%W", function (c) return string.format("%%%x", c:byte()); end)); end\r
+function encode(s) return s and (s:gsub("%W", function (c) return string.format("%%%02x", c:byte()); end)); end\r
 function getpath(username, host, datastore, ext)\r
        ext = ext or "dat";\r
        if username then\r