util.pluginloader: Always use path separator from package.config (thanks Junne)
authorKim Alvefur <zash@zash.se>
Sun, 09 Mar 2014 22:15:40 +0100
changeset 6029 dd3d4cfbd3cb
parent 6026 8a8be471ec72
child 6030 9b91242cc137
util.pluginloader: Always use path separator from package.config (thanks Junne)
util/pluginloader.lua
--- a/util/pluginloader.lua	Wed Feb 26 22:19:58 2014 +0100
+++ b/util/pluginloader.lua	Sun Mar 09 22:15:40 2014 +0100
@@ -39,10 +39,10 @@
 	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);