[R] Bug in list.files(full.names=T)

Bill Dunlap w||||@mwdun|@p @end|ng |rom gm@||@com
Mon Dec 20 17:40:04 CET 2021


>
>     > Why would one ever *add* a final unneeded path separator,
>     > unless one wanted it?
>

Good question, but it is common for Windows installer programs to add a
terminal backslash to PATH entries.  E.g., on my Windows laptop I get

> grep(value=TRUE, "\\\\$", strsplit(Sys.getenv("PATH"), ";")[[1]])
[1] "C:\\Python39\\Scripts\\"
[2] "C:\\Python39\\"
[3] "C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0\\"
[4] "C:\\WINDOWS\\System32\\OpenSSH\\"
[5] "C:\\Program Files\\nodejs\\"
[6] "C:\\Program Files\\Pandoc\\"
[7] "C:\\Program Files\\MiKTeX\\miktex\\bin\\x64\\"
[8] "C:\\Program Files\\PuTTY\\"

I did not add those entries by hand; all were added by installer programs.

-Bill

	[[alternative HTML version deleted]]



More information about the R-help mailing list