From 798455070f30a63641a089b3f619a2fe8101475f Mon Sep 17 00:00:00 2001 From: Nick White Date: Tue, 26 Nov 2019 16:42:46 +0000 Subject: Ensure error in file walking is correctly returned --- cmd/pdfbook/main.go | 3 +++ 1 file changed, 3 insertions(+) (limited to 'cmd/pdfbook') 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 } -- cgit v1.2.1-24-ge1ad