[Rd] Undocumented change of dirname("C:/") on R-devel on Windows

Hiroaki Yutani yut@n|@|n| @end|ng |rom gm@||@com
Thu Feb 23 03:27:21 CET 2023


Hi,

I found dirname() behaves differently on R-devel on Windows. Since I'm not
sure which behavior is right, let me ask here before filing this to R's
Bigzilla.

On R 4.2.2., we get

    > dirname("C:/")
    [1] "C:/"

However, on R-devel (r83888), we get

    > dirname("C:/")
    [1] "."

?dirname says 'dirname returns the part of the path up to but excluding the
last path separator, or "." if there is no path separator,' but I don't see
how the root path is supposed to be treated based on this rule (, whether
it's WIndows or UNIX-alike).

What should we expect as the return value of dirname("C:/")? I feel the
current behavior on R 4.2.2 is right, but I'd like to confirm.

Best,
Yutani

	[[alternative HTML version deleted]]



More information about the R-devel mailing list