Broken file paths in Rstudio 1.2

After installing Rstudio 1.2 on Windows 10, all file paths are not working. For example, when I open Rstudio in an existing project the name of the project has an emdash and two dots appended to the end. and I get the following error:

Error navigating to ~/../Courses/ERMA7310:

The system cannot fine the path specified

The Files tab shows my home directory and not the project directory. When I click the R project cube in the files tab I get the same exact error message as above.

When I navigate in the files tab to the Courses directory, the tab includes the following about the window: Home > .. > Courses.
so it seems that Rstudio is inserting a double dot in the file path after the home directory, which seems to cause it to look up a directory (expected behavior of the double dot in Unix).
Also, upon startup, I see the following at the end of the opening R message:
[Workspace loaded from ~/../Courses/ERMA7310/.Rdata]
When I revert back to Rstudio 1.1.463 the behavior disappears.

SessionInfo:

R version 3.6.0 (2019-04-26)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 17134)

Matrix products: default

Random number generation:
RNG: Mersenne-Twister
Normal: Inversion
Sample: Rounding

locale:
[1] LC_COLLATE=English_United States.1252 LC_CTYPE=English_United States.1252
[3] LC_MONETARY=English_United States.1252 LC_NUMERIC=C
[5] LC_TIME=English_United States.1252

attached base packages:
[1] stats4 stats graphics grDevices utils datasets methods base

loaded via a namespace (and not attached):
[1] compiler_3.6.0 tools_3.6.0 packrat_0.5.0

Can you provide the output of:

path.expand("~/")
Sys.getenv(c("HOME", "R_USER"))

I'm curious whether RStudio is somehow getting confused by the home directory in use on your machine.

path.expand("~/")
[1] "C:/Users/wmm0017//"
Sys.getenv(c("HOME", "R_USER"))
HOME R_USER
"C:/Users/wmm0017/" "C:/Users/wmm0017/"

I believe the issue is that your home directory has a trailing slash for some reason. Did you manually modify your environment variables to include that trailing slash? Removing it should fix the issue.

Kevin,
Thank you for looking into this. I have a few questions. First, Why does this not impact use of the previous version of RStudio? Also, when I look at the path.expand from within the R console (outside of RStudio) I do not see the trailing slash, only from within RStudio. I see it in version 1.2.1355 and from within version 1.1.463. When I go to the Environment Variables in Windows 10 the HOME variable does not have the extra trailing slash.

Thanks for the response. Sorry to say, but I can't think of a reason why this would be the case. Can you think of anything else (e.g. another area where you might be mutating environment variables as used by R / RStudio)?

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.