# HG changeset patch # User Daniel Dourvaris # Date 2016-09-15 08:45:55 # Node ID ff35bfc39edf2e5ea9f7761c3001d04d6a6fb08c # Parent 76d12e4e3f30e0bac7415c9da530ea94f067c609 search: fix bug where file path link was wrong when the repository name was in the file path, fixes #4228 diff --git a/rhodecode/lib/index/whoosh.py b/rhodecode/lib/index/whoosh.py --- a/rhodecode/lib/index/whoosh.py +++ b/rhodecode/lib/index/whoosh.py @@ -265,7 +265,7 @@ class WhooshResultWrapper(object): f_path = '' # noqa if self.search_type in ['content', 'path']: - f_path = res['path'].split(res['repository'])[-1] + f_path = res['path'][len(res['repository']):] f_path = f_path.lstrip(os.sep) if self.search_type == 'content':