[Rd] (PR#7100) and #7102: list.files fails with all.files = TRUE

dmurdoch at pair.com dmurdoch at pair.com
Fri Jul 16 20:47:44 CEST 2004


On Fri, 16 Jul 2004 19:23:21 +0200 (CEST),
ligges at statistik.uni-dortmund.de wrote :

>rpeng at jhsph.edu wrote:
>
>> I get different behavior on Linux:
>> 
>> system("mkdir newdir")
>> dir("newdir", all.files = TRUE, recursive = TRUE)  ## R hangs
>
>The point is that all.files=TRUE implies returning also "." and ".."!
>Hence the recursion uses to be infinite (from "." to "." to "." ......).
>
>If recursiv = TRUE, the function should never look into "." and "..", 
>except of the first step of the recursion.

I'll fix this in r-patched.  It may be a few days before I'm able to
commit the change, though.

Duncan Murdoch



More information about the R-devel mailing list