### Bug description

This follows repo in #1361 and will use the same example. it also requires #1362 to work

First step: 

Use branch from #1362 `bugfix/ext-paths`

Then: 

````
quarto create-project website-with-ext --type website
cd .\website-with-ext\
quarto install extension quarto-ext/code-filename
mkdir more
````

then create a `index.qmd` in `more/` 

````markdown
---
filters:
  - code-filename
---

```{.python filename="matplotlib.py"}
import matplotlib.pyplot as plt
```
````

Then run `quarto render` 

Look into `_site/site_libs`
````
> ls .\_site\site_libs\

    Directory: C:\Users\chris\Documents\DEV_OTHER\ISSUES\quarto\website-with-ext\_site\site_libs

Mode                 LastWriteTime         Length Name
----                 -------------         ------ ----
d----          12/07/2022    16:21                bootstrap
d----          12/07/2022    16:21                clipboard
d----          12/07/2022    16:21                quarto-html
d----          12/07/2022    16:21                quarto-nav
d----          12/07/2022    16:21                quarto-search
````

the dependencies from `code-filename` is not copied whereas it is correctly declared and inserted in HTML doc
https://github.com/quarto-ext/code-filename/blob/85dc809bb539711fa7767b19cac885e33e2664d1/_extensions/code-filename/code-filename.lua#L41-L45

I think the issue is in `copyResourceFile()`
https://github.com/quarto-dev/quarto-cli/blob/8baefa574e0b756ac22e05becad5b97ff33be5d6/src/project/project-resources.ts#L60-L68

* `srcFile` is `C:\Users\chris\Documents\DEV_OTHER\ISSUES\quarto\website-with-ext\more\../_extensions/quarto-ext/code-filename\code-filename.css`
* `rootDir` is `C:\Users\chris\Documents\DEV_OTHER\ISSUES\quarto\website-with-ext\more`

So extension is in the root of the project, but here the `rootDir` considered is the subfolder. So the `if` is TRUE and we do not copy it seems. 

`copyResourceFile()` in question is called from 
https://github.com/quarto-dev/quarto-cli/blob/1f06073c63a6abb12c4d8a169b5257833d522d1f/src/command/render/pandoc-dependencies-html.ts#L184-L191

Hope it helps pinpoint the problem, and hopefully I am in the right place.


2022-07-12T14:30:41Z
cderv
bug
closed
HTML dependencies from extension are not correctly copied when extension is used in subfolder
https://github.com/quarto-dev/quarto-cli/issues/1363