Commit c24ae03a authored by Marin Jankovski's avatar Marin Jankovski

More feedback fixes.

parent c99c4302
...@@ -119,8 +119,6 @@ func handleGetArchive(w http.ResponseWriter, r *gitRequest) { ...@@ -119,8 +119,6 @@ func handleGetArchive(w http.ResponseWriter, r *gitRequest) {
logContext("handleGetArchive finalize cached archive", err) logContext("handleGetArchive finalize cached archive", err)
return return
} }
return
} }
func setArchiveHeaders(w http.ResponseWriter, format string, archiveFilename string) { func setArchiveHeaders(w http.ResponseWriter, format string, archiveFilename string) {
......
...@@ -55,8 +55,6 @@ func handleGetInfoRefs(w http.ResponseWriter, r *gitRequest) { ...@@ -55,8 +55,6 @@ func handleGetInfoRefs(w http.ResponseWriter, r *gitRequest) {
logContext("handleGetInfoRefs wait for subprocess", err) logContext("handleGetInfoRefs wait for subprocess", err)
return return
} }
return
} }
func handlePostRPC(w http.ResponseWriter, r *gitRequest) { func handlePostRPC(w http.ResponseWriter, r *gitRequest) {
...@@ -132,8 +130,6 @@ func handlePostRPC(w http.ResponseWriter, r *gitRequest) { ...@@ -132,8 +130,6 @@ func handlePostRPC(w http.ResponseWriter, r *gitRequest) {
logContext("handlePostRPC wait for subprocess", err) logContext("handlePostRPC wait for subprocess", err)
return return
} }
return
} }
func subCommand(rpc string) string { func subCommand(rpc string) string {
......
...@@ -38,13 +38,10 @@ func lfsAuthorizeHandler(handleFunc serviceHandleFunc) serviceHandleFunc { ...@@ -38,13 +38,10 @@ func lfsAuthorizeHandler(handleFunc serviceHandleFunc) serviceHandleFunc {
return return
} }
tmpDir := r.StoreLFSPath if err := os.Mkdir(r.StoreLFSPath, 0700); err != nil {
if _, err := os.Stat(tmpDir); os.IsNotExist(err) {
if err := os.Mkdir(tmpDir, 0700); err != nil {
fail500(w, "Couldn't create directory for storing LFS tmp objects.", err) fail500(w, "Couldn't create directory for storing LFS tmp objects.", err)
return return
} }
}
handleFunc(w, r) handleFunc(w, r)
}, "/authorize") }, "/authorize")
...@@ -56,13 +53,12 @@ func handleStoreLfsObject(w http.ResponseWriter, r *gitRequest) { ...@@ -56,13 +53,12 @@ func handleStoreLfsObject(w http.ResponseWriter, r *gitRequest) {
body = r.Body body = r.Body
defer body.Close() defer body.Close()
tmpPath := r.StoreLFSPath file, err := ioutil.TempFile(r.StoreLFSPath, r.LfsOid)
file, err := ioutil.TempFile(tmpPath, r.LfsOid)
if err != nil { if err != nil {
fail500(w, "Couldn't open tmp file for writing.", err) fail500(w, "Couldn't open tmp file for writing.", err)
return return
} }
defer os.Remove(tmpPath) defer os.Remove(file.Name())
defer file.Close() defer file.Close()
hash := sha256.New() hash := sha256.New()
......
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