cmake fails to extract zip file on FAT filesystem

Hi,

when running cmake -E tar x somefile.zip on a FAT32 filesystem, cmake fails to unpack the fle.
It reports “CMake Error: Problem with archive_write_finish_entry(): Can’t restore time”.

This comes from here:
https://gitlab.kitware.com/cmake/cmake/-/blob/master/Utilities/cmlibarchive/libarchive/archive_write_disk_windows.c?ref_type=heads#L2592

So libarchive returns ARCHIVE_WARN, not ARCHIVE_FAILED.
Should cmake handle ARCHIVE_WARN really just as a warning and continue ?
It makes my build fail because the zip file is not unpacked.

Alex

I didn’t try this, but as another user, I would also expect CMake to only warn and continue extracting in this case. For example, when working with the flash drive on an embedded system would be a typical modern use case.

Any opinions ?
I found around 450 places in libarchive where ARCHIVE_WARN is returned.
I guess we don’t want to simply accept ARCHIVE_WARN as Ok everywhere and proceed.

Maybe accept ARCHIVE_WARN in this place ?
https://gitlab.kitware.com/cmake/cmake/-/blob/master/Source/cmSystemTools.cxx?ref_type=heads#L2166

Other ideas ?

Thanks
Alex