# HG changeset patch # User Kim Alvefur # Date 1359070577 -3600 # Node ID bc60cad473975997d9acde554ecace041f868132 # Parent 2da869d952719cf86f49274be90d6ff23f77c101 ejabberd2prosody.lua: Don't make assumptions about file name. diff -r 2da869d95271 -r bc60cad47397 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";