Show More
@@ -288,10 +288,10 b' class RepoFilesView(RepoAppView):' | |||
|
288 | 288 | from rhodecode import CONFIG |
|
289 | 289 | _ = self.request.translate |
|
290 | 290 | self.load_default_context() |
|
291 | ||
|
291 | default_at_path = '/' | |
|
292 | 292 | fname = self.request.matchdict['fname'] |
|
293 | 293 | subrepos = self.request.GET.get('subrepos') == 'true' |
|
294 |
at_path = self.request.GET.get('at_path') or |
|
|
294 | at_path = self.request.GET.get('at_path') or default_at_path | |
|
295 | 295 | |
|
296 | 296 | if not self.db_repo.enable_downloads: |
|
297 | 297 | return Response(_('Downloads disabled')) |
@@ -318,12 +318,24 b' class RepoFilesView(RepoAppView):' | |||
|
318 | 318 | |
|
319 | 319 | path_sha = sha1(at_path)[:8] |
|
320 | 320 | |
|
321 | archive_name = '{}-{}{}-{}{}'.format( | |
|
322 |
|
|
|
323 | '-sub' if subrepos else '', | |
|
324 | safe_str(commit.short_id), | |
|
325 | path_sha, | |
|
326 | ext) | |
|
321 | # original backward compat name of archive | |
|
322 | clean_name = safe_str(self.db_repo_name.replace('/', '_')) | |
|
323 | short_sha = safe_str(commit.short_id) | |
|
324 | ||
|
325 | if at_path == default_at_path: | |
|
326 | archive_name = '{}-{}{}{}'.format( | |
|
327 | clean_name, | |
|
328 | '-sub' if subrepos else '', | |
|
329 | short_sha, | |
|
330 | ext) | |
|
331 | # custom path and new name | |
|
332 | else: | |
|
333 | archive_name = '{}-{}{}-{}{}'.format( | |
|
334 | clean_name, | |
|
335 | '-sub' if subrepos else '', | |
|
336 | short_sha, | |
|
337 | path_sha, | |
|
338 | ext) | |
|
327 | 339 | |
|
328 | 340 | use_cached_archive = False |
|
329 | 341 | archive_cache_enabled = CONFIG.get( |
General Comments 0
You need to be logged in to leave comments.
Login now