Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix error in entry type judgment #43

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

kenvifire
Copy link

There is no need to test compressedSize is 0 or not, just to check if the file name ends with '/'.
Following is the code snippet from Java SDK ( java.util.ZipEntry)

/**
* Returns true if this is a directory entry. A directory entry is
* defined to be one whose name ends with a '/'.
* @return true if this is a directory entry
*/
public boolean isDirectory() {
return name.endsWith("/");
}

@shannon
Copy link

shannon commented Feb 14, 2014

+1 this. I ran into an issue today with a zip file created on Chrome OS. For some odd reason the compressed size of the directories is 2 not 0 so it fails this check which then cause an error when it tries to write the children of that directory.

{
"error": "EEXIST, mkdir '/tmp/models'"
}

@sveisvei
Copy link

sveisvei commented Mar 3, 2014

+1 this.

@meuserj
Copy link

meuserj commented Apr 17, 2014

+1

@MathieuLoutre
Copy link

This fixed my problem as well.

Copy link

@Ankurrana Ankurrana left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This fixes my problem as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants