Commit 4b8b0451 authored by Jacob Vosmaer's avatar Jacob Vosmaer

Add missing returns

parent a085cecd
......@@ -31,6 +31,7 @@ func handleGetArchive(w http.ResponseWriter, r *gitRequest) {
format = "tar.bz2"
default:
fail500(w, fmt.Errorf("handleGetArchive: invalid format: %s", urlPath))
return
}
archiveFilename := path.Base(r.ArchivePath)
......@@ -53,6 +54,7 @@ func handleGetArchive(w http.ResponseWriter, r *gitRequest) {
tempFile, err := prepareArchiveTempfile(path.Dir(r.ArchivePath), archiveFilename)
if err != nil {
fail500(w, fmt.Errorf("handleGetArchive: create tempfile: %v", err))
return
}
defer tempFile.Close()
defer os.Remove(tempFile.Name())
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment