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

extract .Z file, filename is wrong #9

Closed
Jin-Whu opened this issue May 22, 2017 · 6 comments
Closed

extract .Z file, filename is wrong #9

Jin-Whu opened this issue May 22, 2017 · 6 comments
Assignees
Labels
Milestone

Comments

@Jin-Whu
Copy link

Jin-Whu commented May 22, 2017

When I extract .Z file, the filename is [Content]

@EruditePig
Copy link

can you show some sample code? I use this lib, but didn't have this problem.

@Jin-Whu
Copy link
Author

Jin-Whu commented May 22, 2017

ftp://ftp.unibe.ch/aiub/CODE/COPG1420.17I.Z, can you try this file? Thanks!

@EruditePig
Copy link

no i cann't download it. you can try www.codeshare.io, it is a good code share website.

@EruditePig
Copy link

maybe this filename has two dots?
you can delete one dot, and try again.

@rikyoz
Copy link
Owner

rikyoz commented May 22, 2017

Hi everyone!
The problem is simply this: the Z format (like bzip2 and unlike gzip) doesn't store the name of the original file in the archive (as you may know, all Z, bzip2 and gzip allow compression of only a single file!).
This means that, when extracting a .Z archive, 7-zip (and then bit7z) doesn't know which name give to the extracted file! Now, the 7-zip File Manager handles this situation by giving to the extracted file the same name of the archive file, but without the archive extension (e.g. example.jpg.Z will be extracted as example.jpg, as well as example.Z will be extracted as example).
However, bit7z was initially based on the sample source code Client7z.cpp of 7-zip , which instead uses that string, "[Content]", as a placeholder for the name of the extracted file.
Until now I was more interested in solving other issues, so I didn't change that behavior.
I plan to solve this issue in the next milestone v2.2, implementing the same behavior of 7-zip File Manager.

@rikyoz rikyoz self-assigned this May 22, 2017
@rikyoz rikyoz added this to the v2.2.0 milestone May 22, 2017
@Jin-Whu
Copy link
Author

Jin-Whu commented May 23, 2017

Thank you! Look forward to the next version!

rikyoz added a commit that referenced this issue Jun 2, 2017
@rikyoz rikyoz closed this as completed Aug 28, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants