You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by br...@apache.org on 2019/09/17 19:48:01 UTC
[allura] 05/05: [#8333] download snapshot fixes when dirs have
unicode chars
This is an automated email from the ASF dual-hosted git repository.
brondsem pushed a commit to branch db/8333
in repository https://gitbox.apache.org/repos/asf/allura.git
commit 5c41fff54f8129841b1328b3a1cf00504114ab75
Author: Dave Brondsema <da...@brondsema.net>
AuthorDate: Tue Sep 17 15:42:28 2019 -0400
[#8333] download snapshot fixes when dirs have unicode chars
---
Allura/allura/controllers/repository.py | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/Allura/allura/controllers/repository.py b/Allura/allura/controllers/repository.py
index 99ba137..6a72149 100644
--- a/Allura/allura/controllers/repository.py
+++ b/Allura/allura/controllers/repository.py
@@ -716,7 +716,7 @@ class CommitBrowser(BaseController):
status = c.app.repo.get_tarball_status(rev, path)
if not status and request.method == 'POST':
allura.tasks.repo_tasks.tarball.post(rev, path)
- redirect('tarball' + '?path={0}'.format(path) if path else '')
+ redirect('tarball' + u'?path={0}'.format(path) if path else '')
return dict(commit=self._commit, revision=rev, status=status)
@expose('json:')
@@ -776,10 +776,10 @@ class TreeBrowser(BaseController, DispatchIndex):
tool_subscribed = M.Mailbox.subscribed()
tarball_url = None
if asbool(tg.config.get('scm.repos.tarball.enable', False)):
- cutout = len('tree' + self._path)
+ cutout = len('tree' + self._path.encode('utf8'))
if request.path.endswith('/') and not self._path.endswith('/'):
cutout += 1
- tarball_url = quote('%starball' % unquote(request.path)[:-cutout])
+ tarball_url = h.urlquote('%starball' % unquote(request.path)[:-cutout])
return dict(
repo=c.app.repo,
commit=self._commit,