aboutsummaryrefslogtreecommitdiffstats
path: root/tools/migration/migrator/prosody_files.lua
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2017-02-02 20:49:09 +0100
committerKim Alvefur <zash@zash.se>2017-02-02 20:49:09 +0100
commit0a385a3953bff3088fb3d4d53cf6a5a9b618f006 (patch)
tree5112717a057722f10d70b13097004eb77572fe54 /tools/migration/migrator/prosody_files.lua
parentf0918f4e1b59ca6f360a4b1ae2974a9c339e71a1 (diff)
downloadprosody-0a385a3953bff3088fb3d4d53cf6a5a9b618f006.tar.gz
prosody-0a385a3953bff3088fb3d4d53cf6a5a9b618f006.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.lua10
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;
+}