Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/resty/template.lua
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,8 @@ local function escaped(view, s)
end

local function readfile(path)
local file = open(path, "rb")
if not file then return nil end
local file, err = open(path, "rb")
if not file then return err end
local content = file:read "*a"
file:close()
return content
Expand Down