Skip to content

Commit

Permalink
Fix #437 (#442)
Browse files Browse the repository at this point in the history
  • Loading branch information
chainsawriot authored Jul 12, 2024
1 parent ff585e2 commit 894bd2e
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions R/compression.R
Original file line number Diff line number Diff line change
@@ -1,33 +1,33 @@
find_compress <- function(f) {
if (grepl("\\.zip$", f)) {
if (endsWith(f, ".zip")) {
return(list(file = sub("\\.zip$", "", f), compress = "zip"))
}
if (grepl("\\.tar\\.gz$", f)) {
if (endsWith(f, ".tar.gz")) {
return(list(file = sub("\\.tar\\.gz$", "", f), compress = "tar.gz"))
}
if (grepl(".tgz$", f)) {
if (endsWith(f, ".tgz")) {
return(list(file = sub("\\.tgz$", "", f), compress = "tar.gz"))
}
if (grepl("\\.tar\\.bz2$", f)) {
if (endsWith(f, ".tar.bz2")) {
return(list(file = sub("\\.tar\\.bz2$", "", f), compress = "tar.bz2"))
}
if (grepl("\\.tbz2$", f)) {
if (endsWith(f, ".tbz2")) {
return(list(file = sub("\\.tbz2$", "", f), compress = "tar.bz2"))
}
if (grepl("\\.tar$", f)) {
if (endsWith(f, ".tar")) {
return(list(file = sub("\\.tar$", "", f), compress = "tar"))
}
if (grepl("\\.gzip$", f)) {
if (endsWith(f, ".gzip")) {
## weird
return(list(file = sub("\\.gzip$", "", f), compress = "gzip"))
}
if (grepl("\\.gz$", f)) {
if (endsWith(f, ".gz")) {
return(list(file = sub("\\.gz$", "", f), compress = "gzip"))
}
if (grepl("\\.bz2$", f)) {
if (endsWith(f, ".bz2")) {
return(list(file = sub("\\.bz2$", "", f), compress = "bzip2"))
}
if (grepl("\\.bzip2$", f)) {
if (endsWith(f, ".bzip2")) {
## weird
return(list(file = sub("\\.bzip2$", "", f), compress = "bzip2"))
}
Expand Down

0 comments on commit 894bd2e

Please sign in to comment.