# HG changeset patch # User Marcin Kuzminski # Date 2012-11-28 01:34:59 # Node ID ec483ce69ad9bdc6e5424cfd8f8c2307652fa9fe # Parent a520d542697e4ef9f0670d898a7dfa00de901e32 added global fix for stripping multiple slashes from f_path variable diff --git a/rhodecode/config/routing.py b/rhodecode/config/routing.py --- a/rhodecode/config/routing.py +++ b/rhodecode/config/routing.py @@ -32,6 +32,10 @@ def make_map(config): from rhodecode.model.db import Repository repo_name = match_dict.get('repo_name') + if match_dict.get('f_path'): + #fix for multiple initial slashes that causes errors + match_dict['f_path'] = match_dict['f_path'].lstrip('/') + try: by_id = repo_name.split('_') if len(by_id) == 2 and by_id[1].isdigit() and by_id[0] == '': diff --git a/rhodecode/controllers/shortlog.py b/rhodecode/controllers/shortlog.py --- a/rhodecode/controllers/shortlog.py +++ b/rhodecode/controllers/shortlog.py @@ -73,7 +73,6 @@ class ShortlogController(BaseRepoControl collection = c.rhodecode_repo c.file_history = f_path if f_path: - f_path = f_path.lstrip('/') # get the history for the file ! tip_cs = c.rhodecode_repo.get_changeset() try: