mirror of
https://github.com/132nd-vWing/tacview-splitter.git
synced 2026-08-26 09:48:36 +02:00
zip files: use filename as provided by zip archive
We assumed that the txt file is always at the top level of the zip file The tacview files from Hoggit have them nested under multiple directories fixes #1
This commit is contained in:
+1
-1
@@ -117,7 +117,7 @@ def read_data(filenames: Filenames) -> list[str]:
|
||||
"""
|
||||
if filenames.input.is_zip:
|
||||
with ZipFile(filenames.input.zip) as fd_zip:
|
||||
with fd_zip.open(filenames.input.txt) as fd_tacview:
|
||||
with fd_zip.open(fd_zip.filelist[0].filename) as fd_tacview:
|
||||
tacview_lines_binary = fd_tacview.readlines()
|
||||
tacview_lines_ascii = []
|
||||
for line in tacview_lines_binary:
|
||||
|
||||
Reference in New Issue
Block a user