Skip to content
Prev 55170 / 63424 Next

download.file does not process gz files correctly (truncates them?)

Also, as mentioned in my
https://stat.ethz.ch/pipermail/r-devel/2012-August/064739.html, when
not specifying the mode argument, the default on Windows is mode = "w"
*except* for certain, case-sensitive, filename extensions:

    if(missing(mode) && length(grep("\\.(gz|bz2|xz|tgz|zip|rda|RData)$", url)))
        mode <- "wb"

Just like the need for mode = "wb" on Windows, the above
special-file-extension-hack is only happening on Windows, and is only
documented in ?download.file if you're on Windows; so someone who's on
Linux/macOS trying to help someone on Windows may not be aware of
this. This adds to even more confusions, e.g. "works for me".

/Henrik
On Thu, May 3, 2018 at 7:27 AM, Joris Meys <jorismeys at gmail.com> wrote:

Thread (25 messages)

Joris Meys download.file does not process gz files correctly (truncates them?) May 2 Joris Meys download.file does not process gz files correctly (truncates them?) May 3 Martin Morgan download.file does not process gz files correctly (truncates them?) May 3 Joris Meys download.file does not process gz files correctly (truncates them?) May 3 Henrik Bengtsson download.file does not process gz files correctly (truncates them?) May 3 Duncan Murdoch download.file does not process gz files correctly (truncates them?) May 3 Martin Morgan download.file does not process gz files correctly (truncates them?) May 3 Jeroen Ooms download.file does not process gz files correctly (truncates them?) May 3 Joris Meys download.file does not process gz files correctly (truncates them?) May 3 Henrik Bengtsson download.file does not process gz files correctly (truncates them?) May 3 Tomas Kalibera download.file does not process gz files correctly (truncates them?) May 3 Martin Maechler download.file does not process gz files correctly (truncates them?) May 4 Joris Meys download.file does not process gz files correctly (truncates them?) May 4 Martin Maechler download.file does not process gz files correctly (truncates them?) May 4 Henrik Bengtsson download.file does not process gz files correctly (truncates them?) May 6 Joris Meys download.file does not process gz files correctly (truncates them?) May 7 Hugh Parsonage download.file does not process gz files correctly (truncates them?) May 7 Gabriel Becker download.file does not process gz files correctly (truncates them?) May 7 Hadley Wickham download.file does not process gz files correctly (truncates them?) May 8 Hadley Wickham download.file does not process gz files correctly (truncates them?) May 8 Tomas Kalibera download.file does not process gz files correctly (truncates them?) May 9 Duncan Murdoch download.file does not process gz files correctly (truncates them?) May 9 Peter Dalgaard download.file does not process gz files correctly (truncates them?) May 9 Dirk Eddelbuettel download.file does not process gz files correctly (truncates them?) May 9 Joris Meys download.file does not process gz files correctly (truncates them?) May 12