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

If I create a zip file that contain zero size files,the Windows 10 Explorer build-in zip viewer can't uncompress it. #243

Closed
yinyue200 opened this issue May 30, 2017 · 8 comments

Comments

@yinyue200
Copy link

yinyue200 commented May 30, 2017

English is not my native language; please excuse typing errors.
Thanks

@yinyue200 yinyue200 changed the title If I create a zip file that contain a zero size file,the Windows 10 Explorer build-in zip viewer can't uncompress it. If I create a zip file that contain zero size files,the Windows 10 Explorer build-in zip viewer can't uncompress it. May 30, 2017
@adamhathcock
Copy link
Owner

Couple questions: does anything else open it? Maybe Windows 10 just doesn't like zero byte files.

Can you show me your code?

@yinyue200
Copy link
Author

@adamhathcock 7zip can open it.
sample code:https://github.com/yinyue200/sharpcompressdemo

Here is the error message.The screenshot is created by the Chinese version of Windows 10, but I hope it can be useful.
tim 20170530214354
a.zip

@adamhathcock
Copy link
Owner

If you create a file like this with a zero byte entry in another application, can Windows 10 open that?

I'm saying it might be a failing (or security check) for Windows 10.

@yinyue200
Copy link
Author

@adamhathcock I can create a zip file that contain zero size file by 7zip. And it can be opened by Windows 10. Here is the file.
a.zip

@yinyue200
Copy link
Author

@adamhathcock Sharpziplib can't open the file that created by sharpcompress and contain zero file too
I hope it can help you.

@adamhathcock
Copy link
Owner

I think it's because the entry is still marked as compressed even though it's zero bytes. The 7Zip created file you gave has the entry marked as CompressionMethod = None.

I guess that's the difference. I don't want to make SharpCompress smart enough to recognize that. That's a user responsibility I think.

@adamhathcock
Copy link
Owner

Found a bug while reviewing this though: #249

@yinyue200
Copy link
Author

@adamhathcock Thanks

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

No branches or pull requests

2 participants