Skip to content

Quarto not detecting subdirectories when using symlinks #860

@eliocamp

Description

@eliocamp

Bug description

Quarto is failing to render a simple document with error

ERROR: Refusing to remove directory /g/data/lo70/ec0044/ensoceof/analysis/test/test_files that isn't a subdirectory of /home/565/ec0044/ensoceof/analysis/test

In my case, /home/565/ec0044/ensoceof/ is a symlink to /g/data/lo70/ec0044/ensoceof/, so the error is not correct. This only happens when using positron and not in RStudio or the terminal. I believe the reason might be that positron does

quarto preview /home/565/ec0044/ensoceof/analysis/test/test.qmd --no-browser --no-watch-inputs --output-dir /scratch/lo70/ec0044/tmp/tmp-2028405-xv6VpRj8kWE3 --embed-resources

while RStudio does

quarto preview test.qmd --to html --no-watch-inputs --no-browse

That is, Positron is specifying an absolute path, while RStudio is using a relative path.

In any case, the command using absolute paths should not fail here. It seems an issue with the logic trying to detect subdirectories. I supposed it could be fixed by using the realpath of each dir. (realpath /home/565/ec0044/ensoceof/analysis/test is /g/data/lo70/ec0044/ensoceof/analysis/test).

Steps to reproduce

No response

Actual behavior

No response

Expected behavior

No response

Your environment

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions