You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by ke...@apache.org on 2020/01/28 20:16:21 UTC
[allura] 06/08: [#8333] download snapshot fixes when dirs have
unicode chars
This is an automated email from the ASF dual-hosted git repository.
kentontaylor pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/allura.git
commit b55b5cb0ef649cc4d3c5ed4f8b23261c3ea33221
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 6d940d6..225ea97 100644
--- a/Allura/allura/controllers/repository.py
+++ b/Allura/allura/controllers/repository.py
@@ -717,7 +717,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 '').encode('utf-8'))
return dict(commit=self._commit, revision=rev, status=status)
@expose('json:')
@@ -777,10 +777,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,