diff --git a/core/sile.lua b/core/sile.lua index 3bc56657d4..8338df6220 100644 --- a/core/sile.lua +++ b/core/sile.lua @@ -321,10 +321,12 @@ function SILE.processFile (filename, format, options) end doc = file:read("*a") end + local cpf = SILE.currentlyProcessingFile SILE.currentlyProcessingFile = filename local pId = SILE.traceStack:pushDocument(filename, doc) local ret = SILE.processString(doc, format, filename, options) SILE.traceStack:pop(pId) + SILE.currentlyProcessingFile = cpf return ret end