Skip to content

Commit

Permalink
Handle blank filenames while extracting (#3456)
Browse files Browse the repository at this point in the history
  • Loading branch information
ludeeus committed Jan 14, 2024
1 parent 25774c1 commit 7aaf86e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions custom_components/hacs/repositories/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -688,6 +688,9 @@ async def download_repository_zip(self):
and filename != self.content.path.remote
):
path.filename = filename.replace(self.content.path.remote, "")
if path.filename == "/":
# Blank files is not valid, and will start to throw in Python 3.12
continue
extractable.append(path)

if len(extractable) == 0:
Expand Down

0 comments on commit 7aaf86e

Please sign in to comment.