Skip to content

Commit

Permalink
Merge pull request #53 from ctrliq/mirror-web-link-fix
Browse files Browse the repository at this point in the history
Mirror Plugin: Fix direct link handling
  • Loading branch information
ikaneshiro authored Apr 2, 2024
2 parents fc7a7ed + 285dce6 commit 0e442fa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/plugins/mirror/web.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ func (p *Plugin) WebHandler(w http.ResponseWriter, r *http.Request) {
http.Redirect(w, r, fmt.Sprintf("/%s/file/%s", repo, file), http.StatusMovedPermanently)
return
} else if rsync.FileMode(repositoryFile.Mode).IsLNK() {
file, err := p.repositoryManager.Get(p.ctx, repository).GetRepositoryFileByReferenceRaw(p.ctx, repositoryFile.Link)
file, err := p.repositoryManager.Get(p.ctx, repository).GetRepositoryFile(p.ctx, repositoryFile.Link)
if err != nil {
http.Error(w, err.Error(), http.StatusInternalServerError)
return
Expand Down

0 comments on commit 0e442fa

Please sign in to comment.