[Tags] Save data in the config directory #637
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This PR fixes #638 by making
Tags
write to the directory specified inConfig
class (which is specified by the cog to be the cog data path set up as a part of bot instance setup) which is writable.Details
Currently the cog writes to a file whose path is specified as a purely relative path, which, at absolute path resolution time, will become a path under wherever the bot is running (most likely not the writable cog data path) and the cog will fail when it does not have write permission to the said resolved path.
This commit specifies a path relative to the cog data path which is writable by cogs, which avoids the aforementioned issue.
Testing
Without the fix
Log lines
With the fix