From c29a3cf6e8fe3e326d0e8917fdf11441620d1c8b Mon Sep 17 00:00:00 2001 From: yuyi Date: Tue, 7 Dec 2021 17:33:53 +0800 Subject: [PATCH] parser: fix (absolute path) error (#12747) --- vlib/v/parser/comptime.v | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/vlib/v/parser/comptime.v b/vlib/v/parser/comptime.v index a8adb2f094..61e5195af4 100644 --- a/vlib/v/parser/comptime.v +++ b/vlib/v/parser/comptime.v @@ -161,7 +161,11 @@ fn (mut p Parser) comptime_call() ast.ComptimeCall { path += '.html' path = os.real_path(path) if !is_html { - path = os.join_path_single(dir, tmpl_path) + if os.is_abs_path(tmpl_path) { + path = tmpl_path + } else { + path = os.join_path_single(dir, tmpl_path) + } } if !os.exists(path) { if is_html {