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

ZIP file contents is not listed #169

Open
bagonyi opened this issue Feb 19, 2019 · 0 comments
Open

ZIP file contents is not listed #169

bagonyi opened this issue Feb 19, 2019 · 0 comments

Comments

@bagonyi
Copy link

bagonyi commented Feb 19, 2019

I have a Java application that creates ZIP files. This is the logic I use to create the file:

[...]
try (final OutputStream fileOutputStream = new FileOutputStream(zipFile);
     final ZipOutputStream zipOutputStream = new ZipOutputStream(fileOutputStream)) {

    zipOutputStream.setMethod(ZipOutputStream.DEFLATED);
    zipOutputStream.setLevel(Deflater.BEST_SPEED);

[... some logic to create a File object (file)]

    final ZipEntry entry = new ZipEntry(file.getAbsolutePath());
    entry.setSize(file.length());
    entry.setTime(file.lastModified());
    zipOutputStream.putNextEntry(entry);
    Files.copy(file.toPath(), zipOutputStream);
    zipOutputStream.closeEntry();
}
[...]

When previewing the contents of the ZIP file with any other application (Finder, Midnight Commander, Forklift) all looks OK. unzip -t says the file is compressed OK. But when I try to preview the file with trolCommander, this is what I get:

trolcommander-zip-listing-issue

As shown in the GIF the file uncompresses all OK, it is just the listing seems to be broken. Do you think it is an issue with trolCommander, or it is because of how I create the ZIP file?

Attaching the file here:
2019-02-19_09_59_19.zip

Environment:

trolCommander
Version: 0.9.9
Build date: 2018/11/05

Java
Runtime version: 1.8.0_192
VM name: Java HotSpot(TM) 64-Bit Server VM
VM version: 25.192-b12
VM vendor: Oracle Corporation

OS
Name: Mac OS X
Version: 10.13.3
Architecture: x86_64

Locale
Language: en
Country: US
Encoding: UTF-8
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

1 participant