From a5ac9b8a2182a9a78088c739af850ab999463c21 Mon Sep 17 00:00:00 2001 From: Michael Nagel Date: Thu, 31 Mar 2016 12:23:45 +0200 Subject: [PATCH] include node name in error when traversing fails I use Syncthing to recursively watch my whole `$HOME`. It fails on the FUSE mount `.gvfs` and this took me *muuuch* to long to figure out. With this change it is much more easy to debug such issues. --- node.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/node.go b/node.go index 4302071..8d794db 100644 --- a/node.go +++ b/node.go @@ -70,7 +70,7 @@ Traverse: case errSkip: continue Traverse default: - return err + return fmt.Errorf("error while traversing %q: %v", nd.Name, err) } // TODO(rjeczalik): tolerate open failures - add failed names to // AddDirError and notify users which names are not added to the tree.