[Rd] possible internal (un)tar bug

Gábor Csárdi c@@rdi@g@bor @ending from gm@il@com
Tue May 1 14:05:32 CEST 2018


This is a not too old R-devel on Linux, it already fails in R 3.4.4, and on
macOS as well.

The tar file seems valid, external tar can untar it, so maybe an untar()
bug.

setwd(tempdir())
dir.create("pkg")
cat("foobar\n",  file = file.path("pkg", "NAMESPACE"))
cat("this: that\n", file = file.path("pkg", "DESCRIPTION"))

tar("pkg_1.0.tar.gz", "pkg", compression = "gzip", tar = "internal")
unlink("pkg", recursive = TRUE)

con <- file("pkg_1.0.tar.gz", open = "rb")
ex <- tempfile()
untar(con, files = "pkg/DESCRIPTION", exdir = ex)

#> Error in untar2(tarfile, files, list, exdir, restore_times) :
#>   incomplete block on file




More information about the R-devel mailing list