fix(microprints): resolve absolute paths correctly for source viewer

- Use Path.expand(Path.join(app_root, path)) to correctly resolve both
  app files (lib/...) and blogex files (../blogex/...)
- Previously Path.join alone did not resolve '..' components, causing
  all source viewers to show the wrong file content
This commit is contained in:
Willem van den Ende 2026-05-15 14:10:02 +01:00
parent f01cdf918a
commit 3434042aed

View File

@ -149,7 +149,7 @@ defmodule FirehoseWeb.MicroprintsLive do
app_root = Mix.Project.project_file() |> Path.dirname()
Enum.map(files, fn path ->
Path.join(app_root, path)
Path.expand(Path.join(app_root, path))
end)
end