X-Git-Url: https://git.enpas.org/?a=blobdiff_plain;f=plugins%2Fmod_storage_sql.lua;h=a5bb5bfa5cddb621e32a6a6b0c1515e8891fc6ca;hb=6c91101e5d303ba822d4f8b3c7a1e3ff3fb32376;hp=1f453d429bf710a3b7d6fca6a20aa45d0a7bf6d9;hpb=1b01b4fe53c7e81fc6911a63031713166f0917bf;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)