search: fix bug where file path link was wrong when the repository
name was in the file path, fixes #4228
This commit is contained in:
parent
92f3db90c9
commit
a1e28ea6b7
1 changed files with 1 additions and 1 deletions
|
|
@ -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':
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue