Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
dms3
go-datastore
Commits
0a5df4f4
Commit
0a5df4f4
authored
Jun 21, 2016
by
Jeromy Johnson
Committed by
GitHub
Jun 21, 2016
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #7 from ipfs/feature/log-flatfs-error
Log errors in Walk function
parents
7d8cb311
e8263c6d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
0 deletions
+4
-0
flatfs/flatfs.go
flatfs/flatfs.go
+4
-0
No files found.
flatfs/flatfs.go
View file @
0a5df4f4
...
...
@@ -319,6 +319,10 @@ func (fs *Datastore) Query(q query.Query) (query.Results, error) {
go
func
()
{
defer
close
(
reschan
)
err
:=
filepath
.
Walk
(
fs
.
path
,
func
(
path
string
,
info
os
.
FileInfo
,
err
error
)
error
{
if
err
!=
nil
{
log
.
Errorf
(
"Walk func in Query got error: %v"
,
err
)
return
err
}
if
!
info
.
Mode
()
.
IsRegular
()
||
strings
.
HasPrefix
(
info
.
Name
(),
"."
)
{
return
nil
...
...
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