Re: [Rd] file.copy(from=Directory, to=File) oddity

2018-04-09 Thread Tomas Kalibera
Thanks for the report, fixed in R-devel. Now we get a warning when copying a directory over a non-directory file is attempted. The target (non-directory) file is left alone. Tomas On 09/08/2017 06:54 PM, William Dunlap via R-devel wrote: When I mistakenly use file.copy() with a directory for

Re: [Rd] file.copy(from=Directory, to=File) oddity

2017-09-11 Thread William Dunlap via R-devel
Bug 17337. Note that I get R making the zero-length file on both Windows and Linux, but the return values are different. Bill Dunlap TIBCO Software wdunlap tibco.com On Mon, Sep 11, 2017 at 7:01 AM, Martin Maechler wrote: > > William Dunlap via R-devel > > on Fri, 8 Sep 2017 09:54

Re: [Rd] file.copy(from=Directory, to=File) oddity

2017-09-11 Thread Martin Maechler
> William Dunlap via R-devel > on Fri, 8 Sep 2017 09:54:58 -0700 writes: > When I mistakenly use file.copy() with a directory for the 'from' argument > and a non-directory for the 'to' and overwrite=TRUE, file.copy returns > FALSE, meaning it could not do the copying. How

[Rd] file.copy(from=Directory, to=File) oddity

2017-09-08 Thread William Dunlap via R-devel
When I mistakenly use file.copy() with a directory for the 'from' argument and a non-directory for the 'to' and overwrite=TRUE, file.copy returns FALSE, meaning it could not do the copying. However, it also replaces the 'to' file with a zero-length file. dir.create( fromDir <- tempfile() ) cat(fi