comparison util/pluginloader.lua @ 10411:db2a06b9ff98

Merge 0.11->trunk
author Kim Alvefur <zash@zash.se>
date Sat, 16 Nov 2019 16:52:31 +0100
parents ff8de86b75f0
children 387d442497e7
comparison
equal deleted inserted replaced
10410:659b577f280c 10411:db2a06b9ff98
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