diff options
author | Nick White <git@njw.name> | 2019-11-26 16:42:46 +0000 |
---|---|---|
committer | Nick White <git@njw.name> | 2019-11-26 16:42:46 +0000 |
commit | 798455070f30a63641a089b3f619a2fe8101475f (patch) | |
tree | 2aa70cf61a233de7448322cffb10110c3dc23e58 /cmd | |
parent | 566c6aa0ccdbd9f03ca67baeeb7c8c45812d4806 (diff) |
Ensure error in file walking is correctly returned
Diffstat (limited to 'cmd')
-rw-r--r-- | cmd/pdfbook/main.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/cmd/pdfbook/main.go b/cmd/pdfbook/main.go index 3fdcc67..56f981d 100644 --- a/cmd/pdfbook/main.go +++ b/cmd/pdfbook/main.go @@ -82,6 +82,9 @@ func addBest(dir string, pdf Pdfer, colour, smaller bool) error { // the pdf for each one. func walker(pdf Pdfer, colour, smaller bool) filepath.WalkFunc { return func(fpath string, info os.FileInfo, err error) error { + if err != nil { + return err + } if info.IsDir() { return nil } |