Skip to content

Commit

Permalink
Handle io.Copy error
Browse files Browse the repository at this point in the history
  • Loading branch information
strk committed Jan 7, 2018
1 parent 3ce7728 commit 8243e4f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion routers/repo/pull.go
Original file line number Diff line number Diff line change
Expand Up @@ -1094,5 +1094,9 @@ func DownloadPullPatch(ctx *context.Context) {
return
}

io.Copy(ctx, patch)
_, err = io.Copy(ctx, patch)
if err != nil {
ctx.Handle(500, "io.Copy", err)
return
}
}

0 comments on commit 8243e4f

Please sign in to comment.