This is an automated email from the ASF dual-hosted git repository.

sbp pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tooling-trusted-release.git


The following commit(s) were added to refs/heads/main by this push:
     new e4ddbdb  Fix a problem with viewing some files
e4ddbdb is described below

commit e4ddbdbf1b858d0125f87c7eb605ecbcffd069fa
Author: Sean B. Palmer <[email protected]>
AuthorDate: Wed Apr 23 16:51:04 2025 +0100

    Fix a problem with viewing some files
---
 atr/routes/candidate.py | 2 ++
 atr/routes/preview.py   | 2 ++
 atr/routes/release.py   | 2 ++
 3 files changed, 6 insertions(+)

diff --git a/atr/routes/candidate.py b/atr/routes/candidate.py
index 28f9343..4667575 100644
--- a/atr/routes/candidate.py
+++ b/atr/routes/candidate.py
@@ -155,6 +155,7 @@ async def view_path(
 
     _max_view_size = 1 * 1024 * 1024
     full_path = util.get_release_candidate_dir() / project_name / version_name 
/ file_path
+    content_listing = await util.archive_listing(full_path)
     content, is_text, is_truncated, error_message = await 
util.read_file_for_viewer(full_path, _max_view_size)
     return await quart.render_template(
         "phase-view-path.html",
@@ -168,6 +169,7 @@ async def view_path(
         error_message=error_message,
         format_file_size=routes.format_file_size,
         phase_key="candidate",
+        content_listing=content_listing,
     )
 
 
diff --git a/atr/routes/preview.py b/atr/routes/preview.py
index 44614e5..8e428c9 100644
--- a/atr/routes/preview.py
+++ b/atr/routes/preview.py
@@ -268,6 +268,7 @@ async def view_path(
     release = await session.release(project_name, version_name, 
phase=models.ReleasePhase.RELEASE_PREVIEW)
     _max_view_size = 1 * 1024 * 1024
     full_path = util.get_release_preview_dir() / project_name / version_name / 
release.unwrap_revision / file_path
+    content_listing = await util.archive_listing(full_path)
     content, is_text, is_truncated, error_message = await 
util.read_file_for_viewer(full_path, _max_view_size)
     return await quart.render_template(
         "phase-view-path.html",
@@ -281,6 +282,7 @@ async def view_path(
         error_message=error_message,
         format_file_size=routes.format_file_size,
         phase_key="preview",
+        content_listing=content_listing,
     )
 
 
diff --git a/atr/routes/release.py b/atr/routes/release.py
index 7597088..20d29ac 100644
--- a/atr/routes/release.py
+++ b/atr/routes/release.py
@@ -149,6 +149,7 @@ async def view_path(
     release = await session.release(project_name, version_name)
     _max_view_size = 1 * 1024 * 1024
     full_path = util.get_release_dir() / project_name / version_name / 
file_path
+    content_listing = await util.archive_listing(full_path)
     content, is_text, is_truncated, error_message = await 
util.read_file_for_viewer(full_path, _max_view_size)
     return await quart.render_template(
         "phase-view-path.html",
@@ -162,4 +163,5 @@ async def view_path(
         error_message=error_message,
         format_file_size=routes.format_file_size,
         phase_key="release",
+        content_listing=content_listing,
     )


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to