Error saving file - cannot find the path specified

I just updated to RStudio RStudio 2024.04.0+735 (more build version at the end) and I am no longer able to save to certain paths on my computer that were previously not an issue.

The log files seem to imply it is incorrectly appending the file location multiple times. For example I want to be saving to the file path:

C:/Users/<username>/<company name>/Documents partages - -US- US MTI/Competitive Analysis/Tenacity Investigation/test.R`

but the log file indicates it is instead saving to:

C:/Users/<username>/<company name>/Documents partages - -US- US MTI/Competitive Analysis/Tenacity Investigation/~ partages - -US- US MTI/Competitive Analysis/Tenacity Investigation/test.R

It almost looks like it's doing something unexpected with the ~ expansion which should be C:/Users/<username>/<company name>/Documents.

Any ideas on trouble shooting this?

Log output:

2024-05-06T14:03:52.322732Z [rsession-christopher.quartara] ERROR system error 3 (The system cannot find the path specified) [path: C:/Users/<username>/<company name>/Documents partages - -US- US MTI/Competitive Analysis/Tenacity Investigation/~ partages - -US- US MTI/Competitive Analysis/Tenacity Investigation/test.R]

Version info:

RStudio 2024.04.0+735 "Chocolate Cosmos" Release (a00d0e775dbc93e0d79a1bf474e3e8e8de677383, 2024-04-24) for windows
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) RStudio/2024.04.0+735 Chrome/120.0.6099.291 Electron/28.2.6 Safari/537.36, Quarto 1.4.553

No idea, but if you need to work, just downgrade to the last version, where it worked.

I opened an issue: Cannot save files to certains paths that worked in previous release · Issue #14764 · rstudio/rstudio · GitHub

I haven't tried to reproduce yet, but will.

So far I can't reproduce, but I'm not clear on the steps involved. Please have a look at the issue.

In response to your comment on the issue.

I have tested this both with a new file I was attempting to create and an existing file that is in that directory.

To clarify my directory structure. My ~ expands to :
C:/Users/<username>/<company name>/Documents

However my project is located in a OneDrive folder located at:
C:/Users/<username>/<company name>/Documents partages - -US- US MTI/Competitive Analysis/Tenacity Investigation/

Sorry for delay, I only look at these community threads sporadically; adding info to the github issue is a better way to continue the conversation. I've copied over your response, and will try to see if I can reproduce the problem with that added information.

Hi again. I've got a fix and it will be in the next RStudio release (late July). Details here: Fix file save/load issues in Desktop with certain folder combinations by gtritchie · Pull Request #14925 · rstudio/rstudio · GitHub

Thanks so much! Glad you could find the issue. Can't wait to see it in a future build.

This topic was automatically closed 90 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.