diff options
author | Kim Alvefur <zash@zash.se> | 2017-02-04 01:08:27 +0100 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2017-02-04 01:08:27 +0100 |
commit | 314ce335b9a3f23224237f829c9b166eeb345187 (patch) | |
tree | 300927642fc0f857d9ea96ab4b1e2bc2d4c20950 /tools/migration/migrator/prosody_files.lua | |
parent | c534c1414eec471209c54a917152593da3198c90 (diff) | |
parent | 0f6de0b8f9c41090298ca0b3f998832971ff51b2 (diff) | |
download | prosody-314ce335b9a3f23224237f829c9b166eeb345187.tar.gz prosody-314ce335b9a3f23224237f829c9b166eeb345187.zip |
Merge 0.10->trunk
Diffstat (limited to 'tools/migration/migrator/prosody_files.lua')
-rw-r--r-- | tools/migration/migrator/prosody_files.lua | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/tools/migration/migrator/prosody_files.lua b/tools/migration/migrator/prosody_files.lua index c9367d9c..4de09273 100644 --- a/tools/migration/migrator/prosody_files.lua +++ b/tools/migration/migrator/prosody_files.lua @@ -18,7 +18,6 @@ local error = error; prosody = {}; local dm = require "util.datamanager" -module "prosody_files" local function is_dir(path) return lfs.attributes(path, "mode") == "directory"; end local function is_file(path) return lfs.attributes(path, "mode") == "file"; end @@ -88,7 +87,7 @@ local function decode_user(item) return userdata; end -function reader(input) +local function reader(input) local path = clean_path(assert(input.path, "no input.path specified")); assert(is_dir(path), "input.path is not a directory"); local iter = coroutine.wrap(function()handle_root_dir(path);end); @@ -127,7 +126,7 @@ function reader(input) end end -function writer(output) +local function writer(output) local path = clean_path(assert(output.path, "no output.path specified")); assert(is_dir(path), "output.path is not a directory"); return function(item) @@ -139,4 +138,7 @@ function writer(output) end end -return _M; +return { + reader = reader; + writer = writer; +} |