safely join path with os.path.join
This commit is contained in:
parent
9228c9a661
commit
ef9c64ec9d
1 changed files with 1 additions and 1 deletions
|
|
@ -52,7 +52,7 @@ class MessageXP(BotBaseCog):
|
|||
self.logger.error(f"Error adding XP: {e}")
|
||||
|
||||
def create_xp_file(self):
|
||||
with open(self.data_dir + "xp.json", "w") as xp_file:
|
||||
with open(os.path.join(self.data_dir, "xp.json"), "w") as xp_file:
|
||||
xp_data = {}
|
||||
json.dump(xp_data, xp_file)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue