Skip to content

Commit 91d40dc

Browse files
also qualify R version
1 parent fe49cf5 commit 91d40dc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

R/fread.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ yaml=FALSE, tmpdir=tempdir(), tz="UTC")
119119
if ((w <- endsWithAny(file, c(".gz", ".bgz",".bz2"))) || (gzsig <- is_gzip(file_signature)) || is_bzip(file_signature)) {
120120
if (!requireNamespace("R.utils", quietly = TRUE))
121121
stopf("To read %s files directly, fread() requires 'R.utils' package which cannot be found. Please install 'R.utils' using 'install.packages('R.utils')'.", if (w<=2L || gzsig) "gz" else "bz2") # nocov
122-
if (packageVersion("R.utils") < "2.13.0")
122+
if (getRversion() >= "4.5.0" && packageVersion("R.utils") < "2.13.0")
123123
stopf("Reading compressed files in fread requires R.utils version 2.13.0 or higher. Please upgrade R.utils.") # nocov
124124
FUN = if (w<=2L || gzsig) gzfile else bzfile
125125
decompFile = tempfile(tmpdir=tmpdir)

0 commit comments

Comments
 (0)