diff options
author | Kim Alvefur <zash@zash.se> | 2017-02-02 20:49:09 +0100 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2017-02-02 20:49:09 +0100 |
commit | 04c82ce1bc86ace025c55e7f7a63044edfc237df (patch) | |
tree | 5112717a057722f10d70b13097004eb77572fe54 /tools/migration/migrator/prosody_files.lua | |
parent | 429bf04ce448523a3f4bad4a3c60afd420a69cdf (diff) | |
download | prosody-04c82ce1bc86ace025c55e7f7a63044edfc237df.tar.gz prosody-04c82ce1bc86ace025c55e7f7a63044edfc237df.zip |
tools/migration/migrator/*: Remove use of module()
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; +} |