Diff

core/moduleapi.lua @ 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
parent 10885:2f751880767c
child 11148:1dc49accb58e
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