parent
96371be97e
commit
49f1b9312d
4
main.go
4
main.go
@ -1,6 +1,8 @@
|
||||
package main
|
||||
|
||||
import "meow.tf/deb-simple"
|
||||
import (
|
||||
"gitea.meow.tf/tyler/deb-simple"
|
||||
)
|
||||
|
||||
func main() {
|
||||
simple.Start()
|
||||
|
@ -12,7 +12,7 @@ import (
|
||||
"encoding/hex"
|
||||
"golang.org/x/crypto/openpgp"
|
||||
"time"
|
||||
"meow.tf/deb-simple/deb/release"
|
||||
"gitea.meow.tf/deb-simple/deb/release"
|
||||
"path"
|
||||
)
|
||||
|
@ -17,6 +17,7 @@ type HttpConf struct {
|
||||
SSL bool `ini:"ssl"`
|
||||
SSLCert string `ini:"cert"`
|
||||
SSLKey string `ini:"key"`
|
||||
EnableVhosts bool `ini:"vhosts"`
|
||||
}
|
||||
|
||||
type RepoConf struct {
|
@ -197,7 +197,9 @@ func uploadHandler(w http.ResponseWriter, r *http.Request) {
|
||||
// Archive old file
|
||||
log.Println("Replacing", p.Name, "with", f.Name)
|
||||
|
||||
if err := os.Remove(path.Join(conf.Repo.Root, p.Path)); err != nil {
|
||||
oldPath := path.Join(conf.Repo.Root, p.Path)
|
||||
|
||||
if err := os.Remove(oldPath); err != nil && !os.IsNotExist(err) {
|
||||
httpErrorf(w, "Unable to remove old package: %s", err)
|
||||
continue
|
||||
}
|
@ -16,7 +16,7 @@ import (
|
||||
"crypto/sha256"
|
||||
"github.com/blang/semver"
|
||||
"encoding/json"
|
||||
"meow.tf/deb-simple/deb/archive"
|
||||
"gitea.meow.tf/deb-simple/deb/archive"
|
||||
"path"
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user