From f83ec15d3d5c3c4bd904aa39d1d8601ff0163743 Mon Sep 17 00:00:00 2001 From: Drew DeVault Date: Mon, 1 Oct 2018 18:35:54 -0400 Subject: [PATCH] Fix this dumb fucking archive endpoint --- gitsrht/blueprints/repo.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gitsrht/blueprints/repo.py b/gitsrht/blueprints/repo.py index 3d8a712..31507f8 100644 --- a/gitsrht/blueprints/repo.py +++ b/gitsrht/blueprints/repo.py @@ -174,7 +174,7 @@ def raw_blob(owner, repo, ref, path): return send_file(BytesIO(blob.data), as_attachment=blob.is_binary, attachment_filename=entry.name) -@repo.route("///archive/") +@repo.route("///archive/.tar.gz") def archive(owner, repo, ref): owner, repo = get_repo(owner, repo) if not repo: @@ -194,7 +194,7 @@ def archive(owner, repo, ref): "--git-dir", repo.path, "archive", "--format=tar.gz", - "--prefix", f"{repo.name}-{ref}", + "--prefix", f"{repo.name}-{ref}/", "-o", path, ref ] print(args) -- 2.38.4