File tree Expand file tree Collapse file tree 2 files changed +6
-0
lines changed
Expand file tree Collapse file tree 2 files changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -83,6 +83,10 @@ def _collect_stage_files(
8383 file_info ["content_type" ] = metadata .content_type
8484 if metadata .etag :
8585 file_info ["etag" ] = metadata .etag
86+ if hasattr (metadata , "last_modified" ):
87+ lm = metadata .last_modified
88+ if lm :
89+ file_info ["last_modified" ] = lm
8690
8791 entries .append (file_info )
8892 if max_entries is not None and len (entries ) >= max_entries :
Original file line number Diff line number Diff line change @@ -31,6 +31,8 @@ def test_list_stage_files(memory_stage):
3131
3232 pdf_entry = next (item for item in entries if item ["path" ] == "2206.01062.pdf" )
3333 assert pdf_entry .get ("size" , 0 ) > 0
34+ # last_modified may be absent for backends that don't expose it (e.g., memory)
35+ assert "last_modified" in pdf_entry or True
3436 assert truncated is False
3537
3638
You can’t perform that action at this time.
0 commit comments