From 34f656e58680b7c3239bb7933d2fadd57d53be21 Mon Sep 17 00:00:00 2001 From: Delgan Date: Wed, 21 Jan 2026 23:12:45 +0100 Subject: [PATCH] Fix files possibly not found in 7z archives Some archives have an empty "Attributes" field, i.e. `Attributes = `. But because we the line is strip, it became `Attributes =` and the `elif` branch was never taken, resulting with `largest_file` being `None` after processing. --- backend/utils/archive_7zip.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/utils/archive_7zip.py b/backend/utils/archive_7zip.py index 06a5d3914..fe4a99cf3 100644 --- a/backend/utils/archive_7zip.py +++ b/backend/utils/archive_7zip.py @@ -42,7 +42,7 @@ def process_file_7z( current_size = 0 for line in lines: - line = line.strip() + line = line.lstrip() if line.startswith("Path = "): current_file = line.split(" = ")[1].strip() elif line.startswith("Size = "):