Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
Geth-Modification
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
张蕾
Geth-Modification
Commits
70176cda
Commit
70176cda
authored
Aug 03, 2018
by
Roc Yu
Committed by
Péter Szilágyi
Aug 03, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
accounts/keystore: rename skipKeyFile to nonKeyFile to better reveal the function purpose (#17290)
parent
d56fa8a6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
file_cache.go
accounts/keystore/file_cache.go
+4
-4
No files found.
accounts/keystore/file_cache.go
View file @
70176cda
...
...
@@ -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
}
//
skip
KeyFile ignores editor backups, hidden files and folders/symlinks.
func
skip
KeyFile
(
fi
os
.
FileInfo
)
bool
{
//
non
KeyFile ignores editor backups, hidden files and folders/symlinks.
func
non
KeyFile
(
fi
os
.
FileInfo
)
bool
{
// Skip editor backups and UNIX-style hidden files.
if
strings
.
HasSuffix
(
fi
.
Name
(),
"~"
)
||
strings
.
HasPrefix
(
fi
.
Name
(),
"."
)
{
return
true
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment