Commit 4e46c31
authored
Fix
* Fix `quarto preview subdir/file.qmd` crashing with doubled path
`quarto preview subdir/page.qmd` in a website project crashes with
`readfile subdir\subdir\page.qmd`. The `projectPath` function was
designed for output filenames (resolving relative to source directory
via dirname+join), but was also called with the source path itself.
When that source path was relative, dirname+join doubled the subdirectory.
Split into two functions: `projectRelativeInput` for source paths
(normalizes directly) and `projectOutputPath` for output filenames
(preserves the dirname+join logic).
* Add missing test for relative/absolute path cache convergence
The FileInformationCacheMap (added in #13955) normalizes keys so that
relative and absolute paths to the same file share one cache entry.
This adds the test case that was missing from the original test suite.quarto preview subdir/file.qmd crashing with doubled path (#14150)1 parent 0f97e05 commit 4e46c31
2 files changed
Lines changed: 44 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
385 | 385 | | |
386 | 386 | | |
387 | 387 | | |
388 | | - | |
389 | | - | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
390 | 406 | | |
391 | 407 | | |
392 | 408 | | |
| |||
411 | 427 | | |
412 | 428 | | |
413 | 429 | | |
414 | | - | |
| 430 | + | |
415 | 431 | | |
416 | 432 | | |
417 | 433 | | |
| |||
421 | 437 | | |
422 | 438 | | |
423 | 439 | | |
424 | | - | |
| 440 | + | |
425 | 441 | | |
426 | 442 | | |
427 | 443 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
| 12 | + | |
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| |||
107 | 107 | | |
108 | 108 | | |
109 | 109 | | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
0 commit comments