Problem with archive_write_header(): Can't replace existing directory with non-directory
From CMake 3.6.3 until 3.8.0-RC3 unpacking a Java archive data (JAR) containing a directory reference it doesn't work:
CMake Error: Problem with archive_write_header(): Can't replace existing directory with non-directory CMake Error: Current file: test/ CMake Error: Problem extracting tar: ../test.zip
Where test.zip contains:
Archive: test.zip Length Date Time Name
0 03-27-2017 20:21 test/ 0 03-27-2017 20:21 test/test2/ 0 03-27-2017 20:21 test/test2/testfile.txt 0 03-27-2017 20:19 test/testfile.txt
This did work with 3.5.2 when executing before: cmake -E tar xzf test.zip and does work in CMake 3.6.3 and later when the file type is a Zip archive data instead.