From b86786aec9fdfd6bb36177daa1a43642aec0582c Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Sat, 28 Mar 2015 16:35:46 +0100 Subject: [PATCH] Do not archive non-existing items --- pipe/pipe.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pipe/pipe.go b/pipe/pipe.go index 7090faa6c..522a6a00b 100644 --- a/pipe/pipe.go +++ b/pipe/pipe.go @@ -86,6 +86,7 @@ var errCancelled = errors.New("walk cancelled") func walk(basedir, dir string, done chan struct{}, jobs chan<- Job, res chan<- Result) error { info, err := os.Lstat(dir) if err != nil { + debug.Log("pipe.walk", "error for %v: %v", dir, err) return err } @@ -188,11 +189,12 @@ func Walk(paths []string, done chan struct{}, jobs chan<- Job, res chan<- Result for _, path := range paths { debug.Log("pipe.Walk", "start walker for %v", path) ch := make(chan Result, 1) - entries = append(entries, ch) err := walk(filepath.Dir(path), path, done, jobs, ch) if err != nil { - return err + debug.Log("pipe.Walk", "error for %v: %v", path, err) + continue } + entries = append(entries, ch) debug.Log("pipe.Walk", "walker for %v done", path) }