aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/mod_storage_sql.lua
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2015-12-15 13:15:30 +0100
committerKim Alvefur <zash@zash.se>2015-12-15 13:15:30 +0100
commit41c42960d763d99927cdeeaae855cccde3920fde (patch)
treee99596ef9e85864ceb80ae141469e4bdc2081984 /plugins/mod_storage_sql.lua
parent04d9feb7f3cdd5fe98147813c8ad766723305b8e (diff)
downloadprosody-41c42960d763d99927cdeeaae855cccde3920fde.tar.gz
prosody-41c42960d763d99927cdeeaae855cccde3920fde.zip
mod_storage_sql: Fix use of SQLite3 in-memory database (no path expansion)
Diffstat (limited to 'plugins/mod_storage_sql.lua')
-rw-r--r--plugins/mod_storage_sql.lua4
1 files changed, 3 insertions, 1 deletions
diff --git a/plugins/mod_storage_sql.lua b/plugins/mod_storage_sql.lua
index adf9f9b6..57d964e2 100644
--- a/plugins/mod_storage_sql.lua
+++ b/plugins/mod_storage_sql.lua
@@ -417,7 +417,9 @@ end
local function normalize_params(params)
if params.driver == "SQLite3" then
- params.database = resolve_relative_path(prosody.paths.data or ".", params.database or "prosody.sqlite");
+ if params.database ~= ":memory:" then
+ params.database = resolve_relative_path(prosody.paths.data or ".", params.database or "prosody.sqlite");
+ end
end
assert(params.driver and params.database, "Configuration error: Both the SQL driver and the database need to be specified");
return params;