From: Jean Privat Date: Fri, 12 Jun 2015 15:41:05 +0000 (-0400) Subject: nitikiwi: fix `src_path` and stop losing the first character X-Git-Tag: v0.7.6~36^2~2 X-Git-Url: http://nitlanguage.org nitikiwi: fix `src_path` and stop losing the first character Signed-off-by: Jean Privat --- 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.