Diff

core/moduleapi.lua @ 7116:ecba5fee4867

Merge 0.10->trunk
author Matthew Wild <mwild1@gmail.com>
date Mon, 01 Feb 2016 21:28:07 +0000
parent 6791:e813e8cf6046
parent 7115:805d068d2fd5
child 7141:362545c3f8bb
line wrap: on
line diff
--- a/core/moduleapi.lua	Sat Jan 30 14:18:42 2016 +0100
+++ b/core/moduleapi.lua	Mon Feb 01 21:28:07 2016 +0000
@@ -137,10 +137,7 @@
 end
 
 function api:require(lib)
-	local f, n = pluginloader.load_code(self.name, lib..".lib.lua", self.environment);
-	if not f then
-		f, n = pluginloader.load_code(lib, lib..".lib.lua", self.environment);
-	end
+	local f, n = pluginloader.load_code_ext(self.name, lib, "lib.lua", self.environment);
 	if not f then error("Failed to load plugin library '"..lib.."', error: "..n); end -- FIXME better error message
 	return f();
 end