# HG changeset patch # User Kim Alvefur # Date 1602079851 -7200 # Node ID 87d6f5924ae9bc062489ba4b6fa67f89a64c67e6 # Parent be73df6765b9f3c3376c0a511e617ceea9ee4c48 core.moduleapi: Use resource path for :load_resource() diff -r be73df6765b9 -r 87d6f5924ae9 core/moduleapi.lua --- 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