util.xmppstream: Have faith in the XML parser matching start and end tags.
[prosody.git] / core / configmanager.lua
index b703bb8c6b92d8540ed20b32894db5638b0a9fe3..8591949272896550998328271d404b8e509bc414 100644 (file)
@@ -47,6 +47,15 @@ function get(host, section, key)
        end
        return nil;
 end
+function _M.rawget(host, section, key)
+       local hostconfig = rawget(config, host);
+       if hostconfig then
+               local sectionconfig = rawget(hostconfig, section);
+               if sectionconfig then
+                       return rawget(sectionconfig, key);
+               end
+       end
+end
 
 local function set(config, host, section, key, value)
        if host and section and key then
@@ -79,7 +88,7 @@ do
                        local is_relative;
                        if path_sep == "/" and path:sub(1,1) ~= "/" then
                                is_relative = true;
-                       elseif path_sep == "\\" and (path:sub(1,1) ~= "/" and path:sub(2,3) ~= ":\\") then
+                       elseif path_sep == "\\" and (path:sub(1,1) ~= "/" and (path:sub(2,3) ~= ":\\" or path:sub(2,3) ~= ":/")) then
                                is_relative = true;
                        end
                        if is_relative then