# cmake fails to extract zip file on FAT filesystem

**URL:** https://discourse.cmake.org/t/cmake-fails-to-extract-zip-file-on-fat-filesystem/9071
**Category:** Development
**Created:** [September 24, 2023, 8:23pm UTC](https://discourse.cmake.org/t/cmake-fails-to-extract-zip-file-on-fat-filesystem/9071 "2023-09-24T20:23:40Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![neundorf](https://discourse.cmake.org/user_avatar/discourse.cmake.org/neundorf/32/2075_2.png) [@neundorf](https://discourse.cmake.org/u/neundorf)
#### Post date: [September 24, 2023, 8:23pm UTC](https://discourse.cmake.org/t/cmake-fails-to-extract-zip-file-on-fat-filesystem/9071/1 "2023-09-24T20:23:40Z")

</div>

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](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

---

<div class="post-metadata">

### Author: ![scivision](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/s/a87d85/32.png) [@scivision](https://discourse.cmake.org/u/scivision)
#### Post date: [September 24, 2023, 9:07pm UTC](https://discourse.cmake.org/t/cmake-fails-to-extract-zip-file-on-fat-filesystem/9071/2 "2023-09-24T21:07:10Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![neundorf](https://discourse.cmake.org/user_avatar/discourse.cmake.org/neundorf/32/2075_2.png) [@neundorf](https://discourse.cmake.org/u/neundorf)
#### Post date: [September 27, 2023, 8:36pm UTC](https://discourse.cmake.org/t/cmake-fails-to-extract-zip-file-on-fat-filesystem/9071/3 "2023-09-27T20:36:41Z")

</div>

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](https://gitlab.kitware.com/cmake/cmake/-/blob/master/Source/cmSystemTools.cxx?ref_type=heads#L2166)

Other ideas ?

Thanks  
Alex
