certmanager, mod_tls: Return final ssl config as third return value (fix for c6caaa44...
[prosody.git] / plugins / mod_storage_sql.lua
index 1f453d429bf710a3b7d6fca6a20aa45d0a7bf6d9..a5bb5bfa5cddb621e32a6a6b0c1515e8891fc6ca 100644 (file)
@@ -49,7 +49,7 @@ local function db2uri(params)
 end
 
 
-local resolve_relative_path = require "core.configmanager".resolve_relative_path;
+local resolve_relative_path = require "util.paths".resolve_relative_path;
 
 local function test_connection()
        if not connection then return nil; end
@@ -380,10 +380,10 @@ end
 local driver = {};
 
 function driver:open(store, typ)
-       if not typ then -- default key-value store
-               return setmetatable({ store = store }, keyval_store);
+       if typ and typ ~= "keyval" then
+               return nil, "unsupported-store";
        end
-       return nil, "unsupported-store";
+       return setmetatable({ store = store }, keyval_store);
 end
 
 function driver:stores(username)