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:
parent
f01cdf918a
commit
3434042aed
@ -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
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user