# fix\(server\): canonicalise media paths the same way their callers do · pingdotgg/t3code

[View on GitCafe](https://git.cafe/pingdotgg/t3code/commit/2c64068e10a194c8d8732a046147b9f240a4104a)

Repository: [pingdotgg/t3code](https://git.cafe/pingdotgg/t3code)

Visibility: public

Requested revision: 2c64068e10a194c8d8732a046147b9f240a4104a

Requested commit: 2c64068e10a194c8d8732a046147b9f240a4104a

Commit: 2c64068e10a194c8d8732a046147b9f240a4104a

Tree: 6b389bdb1e94c2ed890c4594f12b7d7bb474f809

Author: Julius Marminge

Committer: Julius Marminge

## Message

```
fix(server): canonicalise media paths the same way their callers do

openMediaFile rejected a file whenever fs/promises.realpath disagreed with
the path it was handed. Callers canonicalise through Effect's
FileSystem.realPath, which is Node's JS realpath; the promises variant is the
native binding, and on Windows it also expands 8.3 short names, so every
media file under a short-named temp or profile directory was refused as a
symlink swap. Use the same realpath as the callers, so the check still
catches a planted link but agrees with a path that is already canonical.

The favicon and asset tests now build their relative-path expectations with
Path.join rather than a literal '/'.

Co-Authored-By: Claude Code <noreply@anthropic.com>

```

## Parents

- [7b046a0dfa846a1c5519b00c38f1d9b7935db695](https://git.cafe/pingdotgg/t3code/commit/7b046a0dfa846a1c5519b00c38f1d9b7935db695?format=markdown)

[Source at this commit](https://git.cafe/pingdotgg/t3code/tree/2c64068e10a194c8d8732a046147b9f240a4104a?format=markdown)
