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

Check the compression format of input files through MIME types #5

Closed
vrmiguel opened this issue Mar 29, 2021 · 5 comments
Closed

Check the compression format of input files through MIME types #5

vrmiguel opened this issue Mar 29, 2021 · 5 comments
Assignees
Labels
enhancement New feature or request low priority

Comments

@vrmiguel
Copy link
Member

ouch currently determines the compression format of its input files through their extensions, which isn't ideal

@vrmiguel vrmiguel added the enhancement New feature or request label Mar 29, 2021
@vrmiguel vrmiguel self-assigned this Mar 29, 2021
@marcospb19
Copy link
Member

Our usage is now totally guided by the extensions, we cannot fully rely on MIME types, but maybe add some checks before extracting some file.

Like, if we are extracting a .tar.gz file, but it looks like something else, ask via dialog.rs/Confirmation if the user wants to proceed.

But idk, this isn't an impactful change.

@mulimoen
Copy link

I encountered a .tgz file which I had to rename to .tar.gz to exctract. It would be great if this "just worked" by testing for e.g. file signatures.

@marcospb19
Copy link
Member

marcospb19 commented Jul 27, 2021

@mulimoen what if we support .tgz just like .tar.gz? Checking for signatures is complicated.

@mulimoen
Copy link

@marcospb19 That would work just as well for me!

@marcospb19 marcospb19 mentioned this issue Jul 27, 2021
@marcospb19
Copy link
Member

Closing after some internal discussions, we think it's better to check the MIME file types just to give the users previous advice when trying to decompress something that does not match up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request low priority
Projects
None yet
Development

No branches or pull requests

3 participants