You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "MH (JIRA)" <ji...@apache.org> on 2011/02/25 19:40:22 UTC

[jira] Commented: (COMPRESS-126) ZipArchiveEntry.isDirectory() doesn't work

    [ https://issues.apache.org/jira/browse/COMPRESS-126?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12999461#comment-12999461 ] 

MH commented on COMPRESS-126:
-----------------------------

But it is a file with a possible leading relative path! I git an IOException because if this. So, far, I only had plain files in an Archive. Now I have files within directories. The method isDirectory() seems to be "isEmptyDirectory()", right? I found a workaround unzipping such Archives by first getting the parent of the zip entry as a file object and then call mkDirs() to create such directories before unzipping the entry.

> ZipArchiveEntry.isDirectory() doesn't work
> ------------------------------------------
>
>                 Key: COMPRESS-126
>                 URL: https://issues.apache.org/jira/browse/COMPRESS-126
>             Project: Commons Compress
>          Issue Type: Bug
>          Components: Compressors
>    Affects Versions: 1.1
>         Environment: Windows XP, JDK 1.6.0_24
>            Reporter: MH
>
> I have a ZIP Archive that contains 1 file that itself is within a directory. ZipArchiveEntry.getName() returns as expected:
> test/file.txt
> but ZipArchiveEntry.isDirectory() returns false!

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira