From dmurdoch at pair.com  Mon Jul 21 15:19:46 2003
From: dmurdoch at pair.com (Duncan Murdoch)
Date: Mon Jul 21 20:16:22 2003
Subject: [Rd] Bug in file.copy: overwrite=FALSE ignored (PR#3529)
In-Reply-To: <200307211727.h6LHRYJH017824@pubhealth.ku.dk>
References: <200307211727.h6LHRYJH017824@pubhealth.ku.dk>
Message-ID: <ghbohvk56fidc5f5n5r310q959eaeb4k6f@4ax.com>

On Mon, 21 Jul 2003 19:27:34 +0200 (MET DST),
richard_raubertas@merck.com wrote :

>I am using R 1.7.1 on Windows XP Pro.
>
>The 'overwrite=FALSE' argument appears to be ignored in
>file.copy():
>
>> file.exists(c("file1.txt", "file2.txt"))
>[1] TRUE TRUE
>> file.copy(from="file2.txt", to="file1.txt", overwrite=FALSE)
>[1] TRUE
>> 
>
>and sure enough, file1.txt has been overwritten.

There was a bug in the file.copy code; I'll submit a patch.

Duncan Murdoch


[Rd] Bug in file.copy: overwrite=FALSE ignored (PR#3529)
Duncan Murdoch