Currently `download.packages()` copies the full `File` field from the
URL in PACKAGES, including http parameters, as the local filename on
disk. So for example, if the `PACKAGES` file contains
Package: jsonlite
Version: 2.0.0
File:
jsonlite_2.0.0.tar.gz?auth=blabla123&hash=79fad1b6092c1d1cc71e096d02cbc7618837fda1f90b61443f09adc25caab095
Then the file is saved on disk not as `jsonlite_2.0.0.tar.gz` but as
the full url including `?` and `=` and `&` characters which are not
supported and create corrupt files on some platforms.
To reproduce this I created a testing repo:
available.packages(repos = 'https://jeroen.github.io/testrepo/')
download.packages('jsonlite', '.', repos =
'https://jeroen.github.io/testrepo/')
The patch below makes the download behavior of R correspond to
browsers, which is to remove the http-query part from `destfile` when
downloading the package to disk.
https://github.com/r-devel/r-svn/pull/215.diff
Thank you for considering.
______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel