mirror of
https://github.com/go-gitea/gitea
synced 2024-11-07 09:15:53 +01:00
parent
646fd8b570
commit
2236375d66
@ -90,6 +90,11 @@ func (h *Hook) Update() error {
|
||||
h.IsActive = false
|
||||
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)
|
||||
if err != nil {
|
||||
return err
|
||||
|
Loading…
Reference in New Issue
Block a user