From c9cfbb6b7b637a9b48bb67b80e99d54aa311fef1 Mon Sep 17 00:00:00 2001 From: Jean Privat Date: Fri, 12 Jun 2015 11:41:05 -0400 Subject: [PATCH] nitikiwi: fix `src_path` and stop losing the first character Signed-off-by: Jean Privat --- contrib/nitiwiki/src/wiki_base.nit | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/contrib/nitiwiki/src/wiki_base.nit b/contrib/nitiwiki/src/wiki_base.nit index 3e0f329..9cd3eb0 100644 --- a/contrib/nitiwiki/src/wiki_base.nit +++ b/contrib/nitiwiki/src/wiki_base.nit @@ -550,8 +550,10 @@ class WikiArticle redef var src_full_path: nullable String = null redef fun src_path do + var src_full_path = self.src_full_path if src_full_path == null then return null - return src_full_path.substring_from(wiki.config.root_dir.length) + var res = wiki.config.root_dir.relpath(src_full_path) + return res end # The page markdown source content. -- 1.7.9.5