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

find_compress() incorrectly recognizes gzip as zip #395

Closed
chainsawriot opened this issue Apr 25, 2024 · 2 comments · Fixed by #397
Closed

find_compress() incorrectly recognizes gzip as zip #395

chainsawriot opened this issue Apr 25, 2024 · 2 comments · Fixed by #397
Labels

Comments

@chainsawriot
Copy link
Collaborator

While solving #354

As an example:

rio::export(iris, tempfile(fileext = ".csv.gzip"))

gzip doesn't work, due to this

if (grepl("zip$", f)) {

gzip is mistaken as zip.

@chainsawriot
Copy link
Collaborator Author

Actually, bzip2 and xz also don't work, but probably due to another issue.

@chainsawriot
Copy link
Collaborator Author

rio:::find_compress("file.gzip")$compress
#> [1] "zip"

Created on 2024-04-25 with reprex v2.1.0

@chainsawriot chainsawriot changed the title gzip doesn't work find_compress() incorrectly recognize gzip as zip Apr 25, 2024
@chainsawriot chainsawriot changed the title find_compress() incorrectly recognize gzip as zip find_compress() incorrectly recognizes gzip as zip Apr 25, 2024
chainsawriot added a commit that referenced this issue Apr 25, 2024
But it doesn't fix #395 and #396
@chainsawriot chainsawriot mentioned this issue Apr 25, 2024
chainsawriot added a commit that referenced this issue Apr 25, 2024
* Fix #354

But it doesn't fix #395 and #396

* Old R bug on Tar
@chainsawriot chainsawriot reopened this Apr 25, 2024
chainsawriot added a commit that referenced this issue Apr 27, 2024
It won't solve the larger issue, but it makes the detection slightly
more robust.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant