Closed quachtridat closed 1 year ago
Upon invocation of [p]tag add test https://www.google.com, Docker Compose logger prints:
[p]tag add test https://www.google.com
ren | discord.ext.commands.errors.CommandInvokeError: Command raised an exception: PermissionError: [Errno 13] Permission denied: '84f4e12f-9800-4e24-a760-f2b487f19409-tags.json.tmp'
tags
Instead of https://github.com/SFUAnime/Ren/blob/249f5ea30a85f566e5c2ee0405f615820f038bb0/cogs/tags/config.py#L39 we should make sure this file is written to self.directory (i.e., the cog data path managed by the bot) which is always writable by cogs).
self.directory
This issue was known during the previous Ren bot Docker preparation session and a fix was already posted (#637). This was also noted in https://u.sfuani.me/rendockermigration.
Summary
Upon invocation of
[p]tag add test https://www.google.com
, Docker Compose logger prints:Reproduction
tags
.Proposed fix
Instead of https://github.com/SFUAnime/Ren/blob/249f5ea30a85f566e5c2ee0405f615820f038bb0/cogs/tags/config.py#L39 we should make sure this file is written to
self.directory
(i.e., the cog data path managed by the bot) which is always writable by cogs).Note
This issue was known during the previous Ren bot Docker preparation session and a fix was already posted (#637). This was also noted in https://u.sfuani.me/rendockermigration.