Commit 5ac4e6fbaa58e03d233470d0176a19b8b19effaf

Thomas de Grivel 2022-01-15T14:09:49

fix git content

1
2
3
4
5
6
7
8
9
10
11
diff --git a/lib/kmxgit_web/templates/repository/show_git_content.html.heex b/lib/kmxgit_web/templates/repository/show_git_content.html.heex
index ab50da0..6a836f7 100644
--- a/lib/kmxgit_web/templates/repository/show_git_content.html.heex
+++ b/lib/kmxgit_web/templates/repository/show_git_content.html.heex
@@ -22,5 +22,5 @@
   <%= if String.match?(@git.content_type, ~r(^image/)) do %>
     <img src={"data:#{@git.content_type};base64,#{Base.encode64(@git.content)}"}/>
   <% end %>
-  <%= link gettext("Download"), to: Routes.repository_path(@conn, :show, Repository.owner_slug(@repo), Repository.splat(@repo, ["_blob", @branch | String.split(@path, "/")])), class: "btn btn-primary" %>
+  <%= link gettext("Download"), to: Routes.repository_path(@conn, :show, Repository.owner_slug(@repo), Repository.splat(@repo, ["_blob", @tree | String.split(@path, "/")])), class: "btn btn-primary" %>
 </div>