Skip to content

Commit 90eeb9c

Browse files
authored
Merge pull request #1069 from Johann-PLW/main
Update search_files.py
2 parents a62eace + 3d6ef65 commit 90eeb9c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

scripts/search_files.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -307,6 +307,7 @@ def decode_extended_timestamp(self, extra_data):
307307
header_id, data_size = struct.unpack_from('<HH', extra_data, offset)
308308
offset += 4
309309
if header_id == 0x5455:
310+
creation_time = modification_time = None
310311
flags = struct.unpack_from('B', extra_data, offset)[0]
311312
offset += 1
312313
if flags & 1: # Modification time
@@ -336,6 +337,9 @@ def search(self, filepattern, return_on_first_hit=False, force=False):
336337
extracted_path = self.zip_file.extract(member, path=self.data_folder) # already replaces illegal chars with _ when exporting
337338
f = self.zip_file.getinfo(member)
338339
creation_date, modification_date = self.decode_extended_timestamp(f.extra)
340+
print(creation_date)
341+
print(modification_date)
342+
input()
339343
file_info = FileInfo(member, creation_date, modification_date)
340344
self.file_infos[extracted_path] = file_info
341345
date_time = f.date_time

0 commit comments

Comments
 (0)