aboutsummaryrefslogtreecommitdiffstats
path: root/util
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2019-11-08 19:25:57 +0100
committerKim Alvefur <zash@zash.se>2019-11-08 19:25:57 +0100
commitbcaf97314929c5e06eb526917a6047002be481d8 (patch)
tree4fd15f66ce918d286e1cd63ad2e4c591bcefa474 /util
parent82c7e79cc62a89300b0ad6965abb2013de576e59 (diff)
downloadprosody-bcaf97314929c5e06eb526917a6047002be481d8.tar.gz
prosody-bcaf97314929c5e06eb526917a6047002be481d8.zip
util.paths: Don't treat path as pattern, fix traceback (thanks Menel87)
Diffstat (limited to 'util')
-rw-r--r--util/paths.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/util/paths.lua b/util/paths.lua
index c225108a..036f315a 100644
--- a/util/paths.lua
+++ b/util/paths.lua
@@ -48,11 +48,11 @@ function path_util.complement_lua_path(installer_plugin_path)
local lua_path_sep = package.config:sub(3,3);
local dir_sep = package.config:sub(1,1);
local sub_path = dir_sep.."lua"..dir_sep..lua_version..dir_sep;
- if not string.match(package.path, installer_plugin_path) then
+ if not string.find(package.path, installer_plugin_path, 1, true) then
package.path = package.path..lua_path_sep..installer_plugin_path..dir_sep.."share"..sub_path.."?.lua";
package.path = package.path..lua_path_sep..installer_plugin_path..dir_sep.."share"..sub_path.."?"..dir_sep.."init.lua";
end
- if not string.match(package.path, installer_plugin_path) then
+ if not string.find(package.path, installer_plugin_path, 1, true) then
package.cpath = package.cpath..lua_path_sep..installer_plugin_path..dir_sep.."lib"..sub_path.."?.so";
end
end