Can no longer save R/RStudio scripts on OneDrive (windows) - RStudio error

R version: 4.0.3
RStudio version: 1.3
Windows 10, 1909

At my work I have to use OneDrive to store all my files and R scripts. This has worked fine up until recently. Now I get an error message when trying to save or modify an R script. I can create a new script and save it once, but if I try to make changes and save it again the error prevents me from doing so.

The error message in RStudio is:

"The create operation failed because the name contained at least one mount point which resolves to a volume to which the specified device object is not attached"

I have seen some talk online about this being related to that latest Windows 10 version (1909), but I started to experience the issue about 2 weeks before my computer updated to 1909. Besides, my work will not allow a roll back to the previous version.

Microsoft's OneDrive team failed to provide any help on this because they see it as an error on the R/RStudio side. Similarly, I posted on Stack Overflow and it was concluded that I should try here.

The same problem is happening on my colleague's PC. This doesn't seem to happen on Macs.
Anyone else experiencing this? Any solution?

Does the issue alleviate itself if you temporarily disable OneDrive syncing?

I suspect there is a conflict here between RStudio attempting to access these files, and OneDrive attempting to synchronize (or upload?) them to cloud storage.

Hi there @dharper

I've had a horrid experience with OneDrive and R, though I've not seen this error before. Many problems I experienced were (sometimes) because OneDrive kept trying to sync R Packages from the "Documents" folder. This caused a lot of problems (compiling, parse errors etc). It may not be the cause of your problems but I thought it worth mentioning.
Have you considered backing up the content you have and uninstalling OneDrive to see if the error persists?

Thanks and good luck,

Hi @NeuronalMike - Sorry to hear about your own experiences with R + OneDrive! I am stuck with using OneDrive because it's IT policy. I do know that I don't get the error when I use R / RStudio on my local C drive on the same computer, but then I can't collaborate with colleagues, and files aren't automatically backed up (ironically something else that IT policy says needs to happen)

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

If you have a query related to it or one of the replies, start a new topic and refer back with a link.

Oddly enough, the error still persists when I pause the syncing.