Skip to content

Commit d379bdf

Browse files
committed
Fixed config.rewriteOutputPath() sometimes having the wrong context.
1 parent 177d1a6 commit d379bdf

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/functions.lua2p

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2649,7 +2649,11 @@ function _G.rewriteOutputPath(pathRel)
26492649
end
26502650

26512651
if type(site._outputPathFormat) == "function" then
2652-
local sitePathNew = site._outputPathFormat(sitePath)
2652+
local sitePathNew
2653+
!PUSH_CONTEXT "none"
2654+
local rewriteOutputPath_callback = site._outputPathFormat -- :BetterTraceback
2655+
sitePathNew = rewriteOutputPath_callback(sitePath)
2656+
!POP_CONTEXT()
26532657

26542658
if type(sitePathNew) ~= "string" then
26552659
errorf("config.rewriteOutputPath() did not return a string. (%s)", sitePath)

0 commit comments

Comments
 (0)