ejabberd2prosody.lua: Don't make assumptions about file name.
authorKim Alvefur <zash@zash.se>
Fri, 25 Jan 2013 00:36:17 +0100
changeset 5310 bc60cad47397
parent 5309 2da869d95271
child 5311 86fe6e2fa5ae
ejabberd2prosody.lua: Don't make assumptions about file name.
tools/ejabberd2prosody.lua
--- a/tools/ejabberd2prosody.lua	Thu Jan 24 21:48:45 2013 +0100
+++ b/tools/ejabberd2prosody.lua	Fri Jan 25 00:36:17 2013 +0100
@@ -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";