aboutsummaryrefslogtreecommitdiffstats
path: root/doc/storage.tld
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2020-10-09 16:37:15 +0200
committerKim Alvefur <zash@zash.se>2020-10-09 16:37:15 +0200
commitd53dcee89074430a831a5d8e46c17de61a5aa065 (patch)
treeaca0a82a2e0d34a8a0b09fafa25370c1db125111 /doc/storage.tld
parent387a03e1d3fd622dde78b2e4e66abb109f7c40cd (diff)
downloadprosody-d53dcee89074430a831a5d8e46c17de61a5aa065.tar.gz
prosody-d53dcee89074430a831a5d8e46c17de61a5aa065.zip
core.moduleapi: Return resource path from module:get_directory() (API BC)
:get_directory has so far returned the base directory of the current module source code. This has worked well so far to load resources which tend to be included in the same directory, but with the plugin installer using LuaRocks, extra resources (e.g. templates and other assets) these are saved in a completely different directory. In be73df6765b9 core.modulemanager gained some code for finding that directory and saving it in module.resource_path but now the question is how this should be reflected in the API. A survey of community modules suggest the vast majority use the :get_directory method for locating templates and other assets, rather than the code (which would use module:require instead). Therefore this commit changes :get_directory to return the resource_path when available. This should work for most modules.
Diffstat (limited to 'doc/storage.tld')
0 files changed, 0 insertions, 0 deletions