Mercurial > prosody-modules
comparison mod_storage_gdbm/mod_storage_gdbm.lua @ 1593:d9f3c66ea938
mod_storage_gdbm: Use require directly instead of util.import (which is not available in prosodyctl, breaks adduser etc)
| author | Kim Alvefur <zash@zash.se> |
|---|---|
| date | Sun, 25 Jan 2015 13:04:02 +0100 |
| parents | 67fafebdceb7 |
| children | 6288591d5edf |
comparison
equal
deleted
inserted
replaced
| 1592:47fb4f36dacd | 1593:d9f3c66ea938 |
|---|---|
| 7 -- http://webserver2.tecgraf.puc-rio.br/~lhf/ftp/lua/#lgdbm | 7 -- http://webserver2.tecgraf.puc-rio.br/~lhf/ftp/lua/#lgdbm |
| 8 | 8 |
| 9 local gdbm = require"gdbm"; | 9 local gdbm = require"gdbm"; |
| 10 local path = require"util.paths"; | 10 local path = require"util.paths"; |
| 11 local lfs = require"lfs"; | 11 local lfs = require"lfs"; |
| 12 local serialize, deserialize = import("util.serialization", "serialize", "deserialize"); | 12 local serialization = require"util.serialization"; |
| 13 local serialize = serialization.serialize; | |
| 14 local deserialize = serialization.deserialize; | |
| 13 | 15 |
| 14 local base_path = path.resolve_relative_path(prosody.paths.data, module.host); | 16 local base_path = path.resolve_relative_path(prosody.paths.data, module.host); |
| 15 lfs.mkdir(base_path); | 17 lfs.mkdir(base_path); |
| 16 | 18 |
| 17 local cache = {}; | 19 local cache = {}; |
