util.pluginloader: Always use path separator from package.config (thanks Junne)
authorKim Alvefur <zash@zash.se>
Sun, 9 Mar 2014 21:15:40 +0000 (22:15 +0100)
committerKim Alvefur <zash@zash.se>
Sun, 9 Mar 2014 21:15:40 +0000 (22:15 +0100)
util/pluginloader.lua

index c10fdf6525ae2e34868a5bf8bf90c3104664d920..112c0d529a7ab4707b26f168423b1de3b35c84fa 100644 (file)
@@ -39,10 +39,10 @@ function load_resource(plugin, resource)
        resource = resource or "mod_"..plugin..".lua";
 
        local names = {
-               "mod_"..plugin.."/"..plugin.."/"..resource; -- mod_hello/hello/mod_hello.lua
-               "mod_"..plugin.."/"..resource;              -- mod_hello/mod_hello.lua
-               plugin.."/"..resource;                      -- hello/mod_hello.lua
-               resource;                                   -- mod_hello.lua
+               "mod_"..plugin..dir_sep..plugin..dir_sep..resource; -- mod_hello/hello/mod_hello.lua
+               "mod_"..plugin..dir_sep..resource;                  -- mod_hello/mod_hello.lua
+               plugin..dir_sep..resource;                          -- hello/mod_hello.lua
+               resource;                                           -- mod_hello.lua
        };
 
        return load_file(names);