From bafba4b1122192c2c706c1f9ac4800b7b0324745 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20B=C3=BChler?= Date: Sat, 13 Aug 2011 21:28:01 +0200 Subject: [PATCH] [core.cached_html] fix path handling --- doc/core__cached_html.lua | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/doc/core__cached_html.lua b/doc/core__cached_html.lua index 12cbead..e88525a 100644 --- a/doc/core__cached_html.lua +++ b/doc/core__cached_html.lua @@ -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