mirror of https://github.com/go-gitea/gitea.git
parent
f104898989
commit
4a08d574cf
|
@ -90,6 +90,11 @@ func (h *Hook) Update() error {
|
||||||
h.IsActive = false
|
h.IsActive = false
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
d := filepath.Dir(h.path)
|
||||||
|
if err := os.MkdirAll(d, os.ModePerm); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
err := ioutil.WriteFile(h.path, []byte(strings.Replace(h.Content, "\r", "", -1)), os.ModePerm)
|
err := ioutil.WriteFile(h.path, []byte(strings.Replace(h.Content, "\r", "", -1)), os.ModePerm)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
|
|
Loading…
Reference in New Issue