From d5ff394e677bc2c7df5f3e8273ae8515fde0008d 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/ejabberd2prosody.lua') 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