aboutsummaryrefslogtreecommitdiffstats
path: root/tools/ejabberd2prosody.lua
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2013-01-25 00:36:17 +0100
committerKim Alvefur <zash@zash.se>2013-01-25 00:36:17 +0100
commitf092adcb3c0f8ac58ae1d7462c0101efa968621c (patch)
tree08c7b5be191ad31bce555dabfa702686788edb2e /tools/ejabberd2prosody.lua
parentf766f157e715eb12d4c5a460127681c80331feb9 (diff)
downloadprosody-f092adcb3c0f8ac58ae1d7462c0101efa968621c.tar.gz
prosody-f092adcb3c0f8ac58ae1d7462c0101efa968621c.zip
ejabberd2prosody.lua: Don't make assumptions about file name.
Diffstat (limited to 'tools/ejabberd2prosody.lua')
-rwxr-xr-xtools/ejabberd2prosody.lua4
1 files changed, 2 insertions, 2 deletions
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";