From f766f157e715eb12d4c5a460127681c80331feb9 Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Thu, 24 Jan 2013 21:48:45 +0100 Subject: ejabberd2prosody.lua: Replace util.logger with a dummy before requiring util.serialization --- tools/ejabberd2prosody.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tools') diff --git a/tools/ejabberd2prosody.lua b/tools/ejabberd2prosody.lua index 656f0824..ee9e7821 100755 --- a/tools/ejabberd2prosody.lua +++ b/tools/ejabberd2prosody.lua @@ -19,9 +19,9 @@ local erlparse = require "erlparse"; prosody = {}; +package.loaded["util.logger"] = {init = function() return function() end; end} local serialize = require "util.serialization".serialize; local st = require "util.stanza"; -package.loaded["util.logger"] = {init = function() return function() end; end} local dm = require "util.datamanager" dm.set_data_path("data"); -- cgit v1.2.3 From f092adcb3c0f8ac58ae1d7462c0101efa968621c Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Fri, 25 Jan 2013 00:36:17 +0100 Subject: ejabberd2prosody.lua: Don't make assumptions about file name. --- tools/ejabberd2prosody.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tools') diff --git a/tools/ejabberd2prosody.lua b/tools/ejabberd2prosody.lua index ee9e7821..c11e41d9 100755 --- a/tools/ejabberd2prosody.lua +++ b/tools/ejabberd2prosody.lua @@ -11,8 +11,8 @@ package.path = package.path ..";../?.lua"; -if arg[0]:match("^./") then - package.path = package.path .. ";"..arg[0]:gsub("/ejabberd2prosody.lua$", "/?.lua"); +if arg[0]:match("[/\\]") then + package.path = package.path .. ";"..arg[0]:gsub("[^/\\]*$", "?.lua"); end local erlparse = require "erlparse"; -- cgit v1.2.3