Bug in Windows compression lib breaks IntelliJ configuration

Windows 10, IntelliJ 2024.2.2 CE and Ultimate.

I discovered a bug in the Windows compression library used by File Explorer that breaks IDEA projects that are compressed to zip. I thought this would be a good place to document (and warn) fellow users.

If a project is created that contains two hidden directories (e.g., .idea and .git), the Windows compression lib will store only the .git folder and will throw away the .idea folder. I discovered this when a student submitted an assignment to me as a zip file. He claimed that he had created a Run configuration but there was none when I unzipped his project. We ultimately discovered that the .idea folder was missing from the uncompressed archive.

We spent some time trying to understand what was happening. It worked correctly on my Linux machine but not my Win 10 VM. I wasn't certain that it was IJ's fault in the first place and subsequent testing revealed the following using File Explorer only.

    create folder test

   create 3 “.” folders, .foo, .bar, .baz - actually had to open command prompt to do this. FE will not allow you to create . folders

   right click on “test” and “send to compressed folder”

   double click on test.zip to open

   note that there is only one . file, .bar in the archive

So, thankfully IJ doesn't have a defect but may certainly be affected by any project with multiple . folders.

I do not known what the behavior is on the Mac as I don't have access to one.

- Sean

0
1 comment

Confirmed. Workaround is to use another compression program, like 7-zip

0

Please sign in to leave a comment.