#556 Fallback to alternate mtime correctly by james-emerton · Pull Request #557 · PyFilesystem/pyfilesystem2
Type of changes
- Bug fix
Checklist
- I've run the latest black with default args on new code.
- I've updated CHANGELOG.md and CONTRIBUTORS.md where appropriate.
- I've added tests for new code.
- I accept that @PyFilesystem/maintainers may be pedantic in the code review.
Description
This addresses an issues where write_zip() assumed that the details namespace was always available. The stat namespace will be checked first, followed by details, and finally the current time will be used if st_mtime is still None.
I'm willing to author a test against this, but I'm only aware of this being an issue with the s3 filesystem (and only when it encounters a directory) and I'm not certain how best to test that here.