mirror of
				https://github.com/go-gitea/gitea.git
				synced 2025-10-31 19:45:25 +01:00 
			
		
		
		
	Fix lfs preview bug (#14428)
This commit is contained in:
		
							parent
							
								
									e35d1bf502
								
							
						
					
					
						commit
						3287ce22ef
					
				| @ -10,6 +10,7 @@ import ( | ||||
| 	"encoding/base64" | ||||
| 	"fmt" | ||||
| 	gotemplate "html/template" | ||||
| 	"io" | ||||
| 	"io/ioutil" | ||||
| 	"net/url" | ||||
| 	"path" | ||||
| @ -435,7 +436,9 @@ func renderFile(ctx *context.Context, entry *git.TreeEntry, treeLink, rawLink st | ||||
| 
 | ||||
| 			buf = make([]byte, 1024) | ||||
| 			n, err = dataRc.Read(buf) | ||||
| 			if err != nil { | ||||
| 			// Error EOF don't mean there is an error, it just means we read to | ||||
| 			// the end | ||||
| 			if err != nil && err != io.EOF { | ||||
| 				ctx.ServerError("Data", err) | ||||
| 				return | ||||
| 			} | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user