quarto-dev / quarto-dev/quarto-cli

Quarto books on subst drives (windows) give problem with figures from R code when rendering to html

Open
#8,140 0 comments 0 reactions 1 assignee View on GitHub

@cderv is already working on this.

Since Jan 8, 2024.

bug file-systems windows
Dominant language
JavaScript
Stars
6k
Forks
458
Avg merge
1d 9h
Merged PRs (30d)
41

Description

Bug description

When placing a book project in a subst drive on windows, and rendering to html, a weird problem arises: figures resulting from R code will be generated, but figures are not shown in the browser subsequently, because the output is placed into a subdirectory directly under the main directory, instead under _book. This results in error messages like

ERROR: The filename, directory name, or volume label syntax is incorrect. (os error 123), stat 'Q:\qbook\_book\C:\quartosubst\qbook\index_files'
Steps to reproduce

Here is a batch file that reproduces the error (on my windows 11 computer):

c:
mkdir quartosubst
subst q: c:\quartosubst
q:
quarto create project book qbook --no-open

echo. >> qbook\index.qmd
echo ```{r} >> qbook\index.qmd
echo plot(1:4) >> qbook\index.qmd
echo ``` >> qbook\index.qmd

quarto render /qbook/ --to html

If the book is created in the real folder c:\quartosubst instead of q:, there are no problems.

Expected behavior

The rendered html book should show a fancy plot on the index page

Actual behavior

The link to the plot is broken, as directory index_files is placed in the parent directory of _book.

Your environment

Windows 11,
Same behaviour in all IDEs: RStudio, VS-code, terminal

Quarto check output

[>] Checking versions of quarto binary dependencies...
Pandoc version 3.1.1: OK
Dart Sass version 1.55.0: OK
[>] Checking versions of quarto dependencies......OK
[>] Checking Quarto installation......OK
Version: 1.3.450

The same behaviour is observed with Quarto version 1.4.534

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.