summaryrefslogtreecommitdiff
path: root/cmd/pdfbook/main.go
diff options
context:
space:
mode:
authorNick White <git@njw.name>2019-11-26 16:42:46 +0000
committerNick White <git@njw.name>2019-11-26 16:42:46 +0000
commit798455070f30a63641a089b3f619a2fe8101475f (patch)
tree2aa70cf61a233de7448322cffb10110c3dc23e58 /cmd/pdfbook/main.go
parent566c6aa0ccdbd9f03ca67baeeb7c8c45812d4806 (diff)
Ensure error in file walking is correctly returned
Diffstat (limited to 'cmd/pdfbook/main.go')
-rw-r--r--cmd/pdfbook/main.go3
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
}