aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--util/pluginloader.lua5
1 files changed, 4 insertions, 1 deletions
diff --git a/util/pluginloader.lua b/util/pluginloader.lua
index d9553537..9300b98a 100644
--- a/util/pluginloader.lua
+++ b/util/pluginloader.lua
@@ -62,7 +62,10 @@ end
function load_code(plugin, resource)
local content, err = load_resource(plugin, resource);
if not content then return content, err; end
- return loadstring(content, "@"..err);
+ local path = err;
+ local f, err = loadstring(content, "@"..path);
+ if not f then return f, err; end
+ return f, path;
end
return _M;