Skip to content
Prev 69785 / 398525 Next

a problem sourcing a file using chdir=TRUE

There was a pre-existing bug.  ?source in 2.0.1 says

     file: a connection or a character string giving the name of the
           file or URL to read from.

yet it contained

     if (chdir && (path <- dirname(file)) != ".") {

You cannot reasonably run dirname() on a connection or a URL, and it 
throws an error in those cases.

We need a more elaborate detection mechanism, and some re-ordering of the 
code.
On Mon, 16 May 2005, Luca Scrucca wrote: