Skip to content

Commit

Permalink
Use basename for backups download
Browse files Browse the repository at this point in the history
  • Loading branch information
MrNaif2018 committed May 9, 2022
1 parent 4f572e1 commit 327b30c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion api/views/manage.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ async def perform_backup(user: models.User = Security(utils.authorization.AuthDe
lines = message.splitlines()
for line in lines:
if line.startswith("Backed up to"):
filename = line.split()[-1]
filename = os.path.basename(line.split()[-1])
file_id = utils.common.unique_id()
async with utils.redis.wait_for_redis():
await settings.settings.redis_pool.set(f"backups:{file_id}", filename)
Expand Down

0 comments on commit 327b30c

Please sign in to comment.