Compare Directories

HI,

i'm using this plugin again, and i really like the way it looks and appreciate the speed of the file comparison (this seems almost too good to be true in fact).

However I encountered a problem : i compare a directory that includes a directory named "something.ear" and the plugin seems to try to open it as a zip file which fails of course.
Here is the excpetion stack trace (C:\Documents and Settings\E9310750\sandboxes\HFE\HFE2_Servers\defaultConfiguration.wsc\cells\localhost\applications\HFE2XML_EAR.ear is a directory, not an ear file)


C:\Documents and Settings\E9310750\sandboxes\HFE\HFE2_Servers\defaultConfiguration.wsc\cells\localhost\applications\HFE2XML_EAR.ear (Accès refusé)
java.io.FileNotFoundException: C:\Documents and Settings\E9310750\sandboxes\HFE\HFE2_Servers\defaultConfiguration.wsc\cells\localhost\applications\HFE2XML_EAR.ear (Accès refusé)
at java.io.RandomAccessFile.open(Native Method)
at java.io.RandomAccessFile.(RandomAccessFile.java:212) at org.apache.tools.zip.ZipFile.(ZipFile.java:140) at org.apache.tools.zip.ZipFile.(ZipFile.java:101) at org.intellij.idea.dirdiff.model.ArchiveFile.]]>(ArchiveFile.java:28)
at org.intellij.idea.dirdiff.view.CompareThread.addZipEntries(CompareThread.java:267)
at org.intellij.idea.dirdiff.view.CompareThread.getZipEntries(CompareThread.java:259)
at org.intellij.idea.dirdiff.view.CompareThread.createSubNodes(CompareThread.java:123)
at org.intellij.idea.dirdiff.view.CompareThread.createSubNodes(CompareThread.java:132)
at org.intellij.idea.dirdiff.view.CompareThread.createSubNodes(CompareThread.java:132)
at org.intellij.idea.dirdiff.view.CompareThread.createSubNodes(CompareThread.java:132)
at org.intellij.idea.dirdiff.view.CompareThread.createSubNodes(CompareThread.java:132)
at org.intellij.idea.dirdiff.view.CompareThread.createSubNodes(CompareThread.java:132)
at org.intellij.idea.dirdiff.view.CompareThread.createSubNodes(CompareThread.java:132)
at org.intellij.idea.dirdiff.view.CompareThread.run(CompareThread.java:86)

0
2 comments
Avatar
Permanently deleted user

Considering the sources are bundled in the plugin jar file I gave them a look, and it seems the problems comes from the fact that
org.intellij.idea.dirdiff.model.LocalFileSystemFile#isCompressedFile
should be probably return false if the file is a directory ?

0
Avatar
Permanently deleted user

Nice job, Thibaut, you found the bug and the appropriate fix. I never imagined that a directory with an archive file extension would fool the IDEA file type manager, and it definitely does.

0

Please sign in to leave a comment.