# HG changeset patch
# User Kim Alvefur <zash@zash.se>
# Date 1486062685 -3600
# Node ID 1d998891c967bb731d06e553207690bdd96c8e00
# Parent  5d0175d3ecf4687238fd817293fb49bfe7c4bdd8
migrator: Remove wrapper around envloadfile since envloadfile does the right thing in a compatible way

diff -r 5d0175d3ecf4 -r 1d998891c967 tools/migration/prosody-migrator.lua
--- a/tools/migration/prosody-migrator.lua	Tue Jan 31 22:49:09 2017 +0100
+++ b/tools/migration/prosody-migrator.lua	Thu Feb 02 20:11:25 2017 +0100
@@ -40,22 +40,13 @@
 
 local envloadfile = require "util.envload".envloadfile;
 
--- Load config file
-local function loadfilein(file, env)
-	if loadin then
-		return loadin(env, io.open(file):read("*a"));
-	else
-		return envloadfile(file, env);
-	end
-end
-
 local config_file = options.config or default_config;
 local from_store = arg[1] or "input";
 local to_store = arg[2] or "output";
 
 config = {};
 local config_env = setmetatable({}, { __index = function(t, k) return function(tbl) config[k] = tbl; end; end });
-local config_chunk, err = loadfilein(config_file, config_env);
+local config_chunk, err = envloadfile(config_file, config_env);
 if not config_chunk then
 	print("There was an error loading the config file, check the file exists");
 	print("and that the syntax is correct:");