Changeset

5310:bc60cad47397

ejabberd2prosody.lua: Don't make assumptions about file name.
author Kim Alvefur <zash@zash.se>
date Fri, 25 Jan 2013 00:36:17 +0100
parents 5309:2da869d95271
children 5311:86fe6e2fa5ae
files tools/ejabberd2prosody.lua
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- 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";