Skip to content

Commit

Permalink
Remove on.exit as connections autoclose
Browse files Browse the repository at this point in the history
  • Loading branch information
saketkc committed Mar 5, 2021
1 parent 82e843b commit c8be04b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions R/preprocessing.R
Original file line number Diff line number Diff line change
Expand Up @@ -1094,8 +1094,8 @@ ReadMtx <- function(
stop(err, call. = FALSE)
}
if (file_ext(uri) == 'gz') {
uri <- gzcon(con = url(description = uri), text = TRUE)
on.exit(expr = close(con = uri), add = TRUE)
con <- url(description = uri)
uri <- gzcon(con = con, text = TRUE)
}
}
all.files[[i]] <- uri
Expand Down

0 comments on commit c8be04b

Please sign in to comment.