Changeset

11146:87d6f5924ae9

core.moduleapi: Use resource path for :load_resource()
author Kim Alvefur <zash@zash.se>
date Wed, 07 Oct 2020 16:10:51 +0200
parents 11145:be73df6765b9
children 11147:82d6c8e627b9
files core/moduleapi.lua
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/core/moduleapi.lua	Wed Oct 07 15:51:37 2020 +0200
+++ b/core/moduleapi.lua	Wed Oct 07 16:10:51 2020 +0200
@@ -500,7 +500,7 @@
 end
 
 function api:load_resource(path, mode)
-	path = resolve_relative_path(self:get_directory(), path);
+	path = resolve_relative_path(self.resource_path or self:get_directory(), path);
 	return io.open(path, mode);
 end