James-Yu / LaTeX-Workshop

Boost LaTeX typesetting efficiency with preview, compile, autocomplete, colorize, and more.
MIT License
10.47k stars 519 forks source link

"File not found" error when working a separate directories #4233

Closed thomas-saigre closed 3 months ago

thomas-saigre commented 3 months ago

Pre-checks*

Environment*

The Issue*

When source files are in different directories, I get the error message "Cannot view file PDF file. File not found"

Reproduction Steps

  1. Reproduce the following file tree image with
    \documentclass{article}
    \usepackage{lipsum}
    \begin{document}
    \lipsum
    \end{document}

    in TeX files

  2. Compile with the extension doc1, then doc2
  3. Back in doc1, click on the icon "View LaTeX PDF file" (or Ctrl+Alt+V)

At this point, the file cannot be found image as if it was looking at doc1.pdf inside the file2 directory.

Expected Behavior

It should display in a vscode tab or in the browser the pdf of doc1.

Logs

LaTeX Workshop Output*

Please paste the whole log messages below, not parts of ones. The log should start with New log placeholder %WS1% registered. See the gist: https://gist.github.com/thomas-saigre/8f9ff3ff19e1b834faef0dccf42d7bb0, it is 271 lines long