chore: simplify.
This commit is contained in:
parent
92ce6d8d03
commit
b2e1cf6552
@ -130,19 +130,15 @@ func manageEvent(watcher *fsnotify.Watcher, event fsnotify.Event, acmeFile strin
|
|||||||
}
|
}
|
||||||
|
|
||||||
func manageRename(watcher *fsnotify.Watcher, event fsnotify.Event, acmeFile string) error {
|
func manageRename(watcher *fsnotify.Watcher, event fsnotify.Event, acmeFile string) error {
|
||||||
if event.Op&fsnotify.Rename == fsnotify.Rename {
|
if event.Op&fsnotify.Rename != fsnotify.Rename {
|
||||||
err := watcher.Remove(acmeFile)
|
|
||||||
if err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
err = watcher.Add(acmeFile)
|
|
||||||
if err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
if err := watcher.Remove(acmeFile); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
return watcher.Add(acmeFile)
|
||||||
}
|
}
|
||||||
|
|
||||||
func calculateHash(acmeFile string) ([]byte, error) {
|
func calculateHash(acmeFile string) ([]byte, error) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user