We might still be able to add other packages
This commit is contained in:
parent
bfb9cc8142
commit
813a4b07a3
|
@ -155,7 +155,7 @@ func uploadHandler(w http.ResponseWriter, r *http.Request) {
|
|||
|
||||
if !exists {
|
||||
httpErrorf(w, "invalid arch: %s", archType)
|
||||
return
|
||||
continue
|
||||
}
|
||||
|
||||
// New path based off package data
|
||||
|
@ -165,7 +165,7 @@ func uploadHandler(w http.ResponseWriter, r *http.Request) {
|
|||
if os.IsNotExist(err) {
|
||||
if err := os.MkdirAll(newPath, 0755); err != nil {
|
||||
httpErrorf(w, "error creating path: %s", err)
|
||||
return
|
||||
continue
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -174,12 +174,12 @@ func uploadHandler(w http.ResponseWriter, r *http.Request) {
|
|||
|
||||
if err := copyFile(tempFile, path.Join(newPath, part.FileName())); err != nil {
|
||||
httpErrorf(w, "error copying temporary file: %s", err)
|
||||
return
|
||||
continue
|
||||
}
|
||||
|
||||
if err := os.Remove(tempFile); err != nil {
|
||||
httpErrorf(w, "unable to remove temporary file: %s", err)
|
||||
return
|
||||
continue
|
||||
}
|
||||
|
||||
if p, exists := packages[f.Info.Package]; exists {
|
||||
|
@ -189,7 +189,7 @@ func uploadHandler(w http.ResponseWriter, r *http.Request) {
|
|||
if err1 == nil && err2 == nil && v1.Compare(v2) > 0 && !force {
|
||||
// Don't replace newer package
|
||||
httpErrorf(w, "version in old package is greater than new: %s, %s - override with \"force\"", p.Info.Version, f.Info.Version)
|
||||
return
|
||||
continue
|
||||
}
|
||||
|
||||
// Archive old file
|
||||
|
@ -197,7 +197,7 @@ func uploadHandler(w http.ResponseWriter, r *http.Request) {
|
|||
|
||||
if err := os.Remove(path.Join(conf.Repo.Root, p.Path)); err != nil {
|
||||
httpErrorf(w, "Unable to remove old package: %s", err)
|
||||
return
|
||||
continue
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@ import (
|
|||
"io"
|
||||
)
|
||||
|
||||
var VERSION string = "1.3.4"
|
||||
var VERSION string = "1.3.5"
|
||||
|
||||
func packageName(name string) string {
|
||||
if index := strings.Index(name, "_"); index != -1 {
|
||||
|
|
Loading…
Reference in New Issue