Skip to content

Commit c275ab1

Browse files
committed
fix(handlers): do not process empty files in multi-volume sevenzip.
1 parent ad033a8 commit c275ab1

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

unblob/handlers/archive/sevenzip.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,11 @@ class MultiVolumeSevenZipHandler(DirectoryHandler):
107107

108108
def calculate_multifile(self, file: Path) -> Optional[MultiFile]:
109109
paths = sorted(
110-
[p for p in file.parent.glob(f"{file.stem}.*") if p.resolve().exists()]
110+
[
111+
p
112+
for p in file.parent.glob(f"{file.stem}.*")
113+
if p.resolve().exists() and p.stat().st_size > 0
114+
]
111115
)
112116
if not paths:
113117
return None

0 commit comments

Comments
 (0)