Skip to content

Commit

Permalink
cmd/clef: suppress fsnotify error if keydir not exists (ethereum#28160)
Browse files Browse the repository at this point in the history
As the keydir will be automatically created after an account is created, no error message if the watcher is failed.
  • Loading branch information
jsvisa authored and tyler-smith committed Oct 12, 2023
1 parent cdcd4a4 commit 5a1f60b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion accounts/keystore/watch.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
package keystore

import (
"os"
"time"

"github.com/ethereum/go-ethereum/log"
Expand Down Expand Up @@ -77,7 +78,9 @@ func (w *watcher) loop() {
}
defer watcher.Close()
if err := watcher.Add(w.ac.keydir); err != nil {
logger.Warn("Failed to watch keystore folder", "err", err)
if !os.IsNotExist(err) {
logger.Warn("Failed to watch keystore folder", "err", err)
}
return
}

Expand Down

0 comments on commit 5a1f60b

Please sign in to comment.