rstudio / rstudio

RStudio is an integrated development environment (IDE) for R
https://posit.co/products/open-source/rstudio/
Other
4.58k stars 1.08k forks source link

Error on Windows, can't find the correct path after saving viewer. #14702

Open olivroy opened 2 weeks ago

olivroy commented 2 weeks ago

System details

RStudio Edition : Desktop [Open Source]
RStudio Version : 2023.12.0.369 + 2024.04.0+693
OS Version      : Windows 10 x64 (build 19045)
R Version       : R version 4.3.2 (2023-10-31 ucrt)

Steps to reproduce the problem

  1. Open an RStudio project
  2. Run the following code
library(gt)
exibble |> gt()
  1. In viewer pane, go to Export, select Save as image

  2. Select a directory outside your current project.

  3. Select the box open file after saving

Describe the problem in detail

I get an error. Path not found. However, in the error dialog, the correct target file is displayed.

The file saved appear not to be correct either.

If you can't reproduce, maybe this could be related too:

I use Electron based file dialog. I have set default working directory location?

Describe the behavior you expected

I would expect to work correctly, like it does when I save the file inside the working directory. I was able to reproduce for 2 versions of RStudio.

ronblum commented 2 weeks ago

Thanks @olivroy ! I can reproduce this on Windows at least as far back as RStudio Desktop 2023.03.2+454. The file gets saved, but the error message appears regardless.