Make ejabberd2prosody.lua a little more cross-platform :)

This commit is contained in:
Matthew Wild 2008-11-29 19:52:20 +00:00
parent 354c65daa0
commit f5830f6ada

View file

@ -12,7 +12,10 @@ dm.set_data_path(data_path);
local _mkdir = {} local _mkdir = {}
function mkdir(path) function mkdir(path)
if os.getenv("WINDIR") then
-- I'm afraid it's true :(
path = path:gsub("/", "\\"); path = path:gsub("/", "\\");
end
--print("mkdir",path); --print("mkdir",path);
local x = io.popen("mkdir "..path.." 2>&1"):read("*a"); local x = io.popen("mkdir "..path.." 2>&1"):read("*a");
end end