Chromium Code Reviews| Index: client/archiver/directory.go |
| diff --git a/client/archiver/directory.go b/client/archiver/directory.go |
| index 961849fd63193c75a0febb609b58d95baf798f12..24c91afd19394b1bfafcb721bc9654b7b5f009c0 100644 |
| --- a/client/archiver/directory.go |
| +++ b/client/archiver/directory.go |
| @@ -69,7 +69,7 @@ func walk(root string, blacklist []string, c chan<- *walkItem) { |
| err := filepath.Walk(root, func(p string, info os.FileInfo, err error) error { |
| total++ |
| if err != nil { |
| - return fmt.Errorf("walk(%s): %s", p, err) |
| + return fmt.Errorf("walk(%q): %v", p, err) |
|
mithro
2016/11/29 03:43:44
This will cause the binary to fail if it tries to
djd-OOO-Apr2017
2016/11/29 03:51:55
Do you have a suggestion on how to check that? Als
|
| } |
| if len(p) <= rootLen { |
| // Root directory. |
| @@ -98,7 +98,8 @@ func walk(root string, blacklist []string, c chan<- *walkItem) { |
| return nil |
| }) |
| if err != nil { |
| - c <- &walkItem{err: err} |
| + // No point continuing if an error occurred during walk. |
| + log.Fatalf("Unable to walk %q: %v", root, err) |
|
tandrii(chromium)
2016/11/30 14:35:08
1. a test for this would be nice anyway - panic ca
M-A Ruel
2016/11/30 15:39:14
I'm not enthusiastic about hard failing vs cleanly
|
| } |
| } |