Cannot save or open R scripts from within Rstudio on Windows 10 on network shares after upgrade

Hi,

I would like to reopen an issue previously reported but with no clear resolution (see
Saving Scripts/Confirm Change File Type, Cannot save R scripts via RStudio version 1.2.5001).

I just upgraded rstudio to 1.2.5033. Unfortunately I do not know the version I was using previously but it was fairly old (~ 6 months or more). If there is a way to see the previous version on Windows let me know and I can add.

I am running on Windows 10 enterprise 10.0.16299 Build 16299.

As soon as I upgraded I can no longer save R scripts to network shares, I get the message "The filename, directory name, or volume label syntax is incorrect" reported elsewhere after being asked if I am "sure you want to change the type of the file so that it is no longer an R script?". I can save to C:\TEMP.

Note I also get an error when trying to open an R script on the share via the IDE. If I launch the IDE by double-clicking on the file it works fine, and once I've opened it once in Rstudio, I can open it again.

I do not have admin rights to this computer and I need to be able to save to My Documents which is networked for backup purposes. Note 'controlled folder access' is turned off (another user reported that adding rstudio to the exception list fixed their issue).

Any help would be much appreciated!

Peter

Sorry to hear you're having trouble! Can you share some more information?

  • Can you share the name / format of the file path used to reference the network share, in this case?

  • Do you know what kind of networked filesystem is being used, in case it's relevant?

  • Do you have any better luck if you map your network share to a local drive letter (if that is an option for you)?

If required, previous versions of RStudio are available for download at https://support.rstudio.com/hc/en-us/articles/206569407-Older-Versions-of-RStudio.

Hi, yes the paths are of this format:

path <- "\\server.xxx.gov/Private/username/My Documents/path_to_data"

I use these extensively in my R code because the server is automatically backed up and the path is available offline as well. I tried creating a network shortcut, which resulted in a path like this:

C:\Users\username\AppData\Roaming\Microsoft\Windows\Network Shortcuts\Documents

I tried creating a network drive, and that does seem to solve the problem, thanks - I should have tried that earlier. I think I was avoiding because was dreading having to revise all of my files to use network shares, however now I am realizing for Rstudio I just need to open the file from a network share, I don't need to revise any R scripts to use the network share (other than maybe when calling setwd).

Note another side effect of this problem is that Rstudio silently fails to save temporary backups of your R scripts. It is also interesting that R itself has no problem with these paths, even from within Rstudio.

thanks,
Peter

1 Like

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