prosody

changeset 627
3712d36b6d25
parent 615
4ae3e81513f3
child 643
8ff454831f7d
--- a/prosody	Sat Dec 13 17:43:52 2008 +0000
+++ b/prosody	Tue Dec 16 03:46:17 2008 +0500
@@ -115,7 +115,7 @@
 	path = path:gsub("/", path_separator);
 	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 mkdirs(host)
 	if not _mkdir[host] then
 		local host_dir = string.format("%s/%s", data_path, encode(host));

mercurial