X-Git-Url: https://git.enpas.org/?a=blobdiff_plain;f=plugins%2Fmod_storage_sql.lua;h=a5bb5bfa5cddb621e32a6a6b0c1515e8891fc6ca;hb=762427887bb2315dcd34e1e0528d366a10b38e93;hp=1f453d429bf710a3b7d6fca6a20aa45d0a7bf6d9;hpb=db5688d8546c1387ece50f3ae76c3434367d6c12;p=prosody.git diff --git a/plugins/mod_storage_sql.lua b/plugins/mod_storage_sql.lua index 1f453d42..a5bb5bfa 100644 --- a/plugins/mod_storage_sql.lua +++ b/plugins/mod_storage_sql.lua @@ -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)