Software /
code /
prosody
Changeset
10402:0971694b30a8
util.paths: Don't treat path as pattern, fix traceback (thanks Menel87)
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Fri, 08 Nov 2019 19:25:57 +0100 |
parents | 10401:1ef1f6c43c5b |
children | 10403:3b82e9df5a7a |
files | util/paths.lua |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/util/paths.lua Fri Nov 08 00:58:03 2019 +0100 +++ b/util/paths.lua Fri Nov 08 19:25:57 2019 +0100 @@ -48,11 +48,11 @@ 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