2
0
Fork 0

[core.cached_html] fix path handling

personal/stbuehler/wip
Stefan Bühler 2011-08-13 21:28:01 +02:00
parent 92ca097ed4
commit bafba4b112
1 changed files with 6 additions and 1 deletions

View File

@ -1,5 +1,10 @@
local function try_cached_html(vr)
local p = vr.phys.path .. '.html'
local p = vr.phys.path
if p:sub(-1) == '/' then
p = p:sub(0, -2) .. '.html'
else
p = p .. '.html'
end
st, res = vr:stat(p)
if st and st.is_file then
-- found the file