mirror of
https://github.com/rommapp/romm.git
synced 2026-03-03 02:17:01 +00:00
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.
This commit is contained in:
@@ -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 = "):
|
||||
|
||||
Reference in New Issue
Block a user