diff options
author | Roc Yu <rociiu0112@gmail.com> | 2018-08-03 15:25:17 +0800 |
---|---|---|
committer | Péter Szilágyi <peterke@gmail.com> | 2018-08-03 15:25:17 +0800 |
commit | 70176cda0eedbb4ec9cde867e8f6cde63efa5a12 (patch) | |
tree | 0afd5d3ec8fe6930dd34f521f9b1a8903777135f /accounts/keystore | |
parent | d56fa8a659be164d3df792963351e573866c6597 (diff) | |
download | dexon-70176cda0eedbb4ec9cde867e8f6cde63efa5a12.tar dexon-70176cda0eedbb4ec9cde867e8f6cde63efa5a12.tar.gz dexon-70176cda0eedbb4ec9cde867e8f6cde63efa5a12.tar.bz2 dexon-70176cda0eedbb4ec9cde867e8f6cde63efa5a12.tar.lz dexon-70176cda0eedbb4ec9cde867e8f6cde63efa5a12.tar.xz dexon-70176cda0eedbb4ec9cde867e8f6cde63efa5a12.tar.zst dexon-70176cda0eedbb4ec9cde867e8f6cde63efa5a12.zip |
accounts/keystore: rename skipKeyFile to nonKeyFile to better reveal the function purpose (#17290)
Diffstat (limited to 'accounts/keystore')
-rw-r--r-- | accounts/keystore/file_cache.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/accounts/keystore/file_cache.go b/accounts/keystore/file_cache.go index 26da34dcf..73ff6ae9e 100644 --- a/accounts/keystore/file_cache.go +++ b/accounts/keystore/file_cache.go @@ -56,9 +56,9 @@ func (fc *fileCache) scan(keyDir string) (mapset.Set, mapset.Set, mapset.Set, er var newLastMod time.Time for _, fi := range files { - // Skip any non-key files from the folder path := filepath.Join(keyDir, fi.Name()) - if skipKeyFile(fi) { + // Skip any non-key files from the folder + if nonKeyFile(fi) { log.Trace("Ignoring file on account scan", "path", path) continue } @@ -88,8 +88,8 @@ func (fc *fileCache) scan(keyDir string) (mapset.Set, mapset.Set, mapset.Set, er return creates, deletes, updates, nil } -// skipKeyFile ignores editor backups, hidden files and folders/symlinks. -func skipKeyFile(fi os.FileInfo) bool { +// nonKeyFile ignores editor backups, hidden files and folders/symlinks. +func nonKeyFile(fi os.FileInfo) bool { // Skip editor backups and UNIX-style hidden files. if strings.HasSuffix(fi.Name(), "~") || strings.HasPrefix(fi.Name(), ".") { return true |