Software /
code /
prosody
Diff
plugins/mod_storage_sql.lua @ 7008:9beba2572e2b
mod_storage_sql: Fix use of SQLite3 in-memory database (no path expansion)
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Tue, 15 Dec 2015 13:15:30 +0100 |
parent | 6954:400badaf1fc7 |
child | 7149:bb0fd02ae70f |
line wrap: on
line diff
--- a/plugins/mod_storage_sql.lua Sun Dec 13 21:21:09 2015 +0100 +++ b/plugins/mod_storage_sql.lua Tue Dec 15 13:15:30 2015 +0100 @@ -417,7 +417,9 @@ 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;