aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShulhan <m.shulhan@gmail.com>2019-08-29 00:11:01 +0700
committerShulhan <m.shulhan@gmail.com>2019-08-29 00:11:01 +0700
commit00fcc777782b9fce794f265e36156dc3d8b5c6f0 (patch)
treea13235706fe415c4c0dd13ae2c884c983b79fc86
parent292bbb29aa44ff3a1632b27715596b2b00b77589 (diff)
downloadpakakeh.go-00fcc777782b9fce794f265e36156dc3d8b5c6f0.tar.xz
memfs: log and ignore error from NewNode
An error for calling NewNode should not stop processing all files in directory.
-rw-r--r--lib/memfs/memfs.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/memfs/memfs.go b/lib/memfs/memfs.go
index 222f9575..a9669d0a 100644
--- a/lib/memfs/memfs.go
+++ b/lib/memfs/memfs.go
@@ -371,7 +371,8 @@ func (mfs *MemFS) AddChild(parent *Node, fi os.FileInfo) (child *Node, err error
child, err = NewNode(parent, fi, mfs.withContent)
if err != nil {
- return nil, err
+ log.Printf("memfs: AddChild %s: %s", fi.Name(), err.Error())
+ return nil, nil
}
child.SysPath = sysPath