Skip to content

Commit 7aaf86e

Browse files
authored
Handle blank filenames while extracting (#3456)
1 parent 25774c1 commit 7aaf86e

File tree

1 file changed

+3
-0
lines changed
  • custom_components/hacs/repositories

1 file changed

+3
-0
lines changed

custom_components/hacs/repositories/base.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -688,6 +688,9 @@ async def download_repository_zip(self):
688688
and filename != self.content.path.remote
689689
):
690690
path.filename = filename.replace(self.content.path.remote, "")
691+
if path.filename == "/":
692+
# Blank files is not valid, and will start to throw in Python 3.12
693+
continue
691694
extractable.append(path)
692695

693696
if len(extractable) == 0:

0 commit comments

Comments
 (0)