From 7aaf86edc44c794a610bda42dc325d778285dbb0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joakim=20S=C3=B8rensen?= Date: Sun, 14 Jan 2024 17:53:51 +0100 Subject: [PATCH] Handle blank filenames while extracting (#3456) --- custom_components/hacs/repositories/base.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/custom_components/hacs/repositories/base.py b/custom_components/hacs/repositories/base.py index c5874c36c5a..4af6fb00c34 100644 --- a/custom_components/hacs/repositories/base.py +++ b/custom_components/hacs/repositories/base.py @@ -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: