diff options
author | Kim Alvefur <zash@zash.se> | 2019-11-08 19:25:57 +0100 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2019-11-08 19:25:57 +0100 |
commit | c900a5c54439d358628540fbb697d41303b28d10 (patch) | |
tree | 4fd15f66ce918d286e1cd63ad2e4c591bcefa474 /util | |
parent | 03197f584d7da03d113d91375b303823f0abadce (diff) | |
download | prosody-c900a5c54439d358628540fbb697d41303b28d10.tar.gz prosody-c900a5c54439d358628540fbb697d41303b28d10.zip |
util.paths: Don't treat path as pattern, fix traceback (thanks Menel87)
Diffstat (limited to 'util')
-rw-r--r-- | util/paths.lua | 4 |
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 |