Software / code / prosody
Comparison
util/pluginloader.lua @ 10205:ff8de86b75f0
util.pluginloader: Added a new path to the variable local_names
| author | João Duarte <jvsDuarte08@gmail.com> |
|---|---|
| date | Fri, 16 Aug 2019 13:54:40 -0700 |
| parent | 8382:e5d00bf4a4d5 |
| child | 11129:387d442497e7 |
comparison
equal
deleted
inserted
replaced
| 10204:fbd4a5bc3a01 | 10205:ff8de86b75f0 |
|---|---|
| 34 return file, err; | 34 return file, err; |
| 35 end | 35 end |
| 36 | 36 |
| 37 local function load_resource(plugin, resource) | 37 local function load_resource(plugin, resource) |
| 38 resource = resource or "mod_"..plugin..".lua"; | 38 resource = resource or "mod_"..plugin..".lua"; |
| 39 | 39 local lua_version = _VERSION:match(" (.+)$"); |
| 40 local names = { | 40 local names = { |
| 41 "mod_"..plugin..dir_sep..plugin..dir_sep..resource; -- mod_hello/hello/mod_hello.lua | 41 "mod_"..plugin..dir_sep..plugin..dir_sep..resource; -- mod_hello/hello/mod_hello.lua |
| 42 "mod_"..plugin..dir_sep..resource; -- mod_hello/mod_hello.lua | 42 "mod_"..plugin..dir_sep..resource; -- mod_hello/mod_hello.lua |
| 43 plugin..dir_sep..resource; -- hello/mod_hello.lua | 43 plugin..dir_sep..resource; -- hello/mod_hello.lua |
| 44 resource; -- mod_hello.lua | 44 resource; -- mod_hello.lua |
| 45 "share"..dir_sep.."lua"..dir_sep..lua_version..dir_sep.."mod_"..plugin..dir_sep..resource; | |
| 45 }; | 46 }; |
| 46 | 47 |
| 47 return load_file(names); | 48 return load_file(names); |
| 48 end | 49 end |
| 49 | 50 |