From b31a2cc1ca89cee1bd049157523d1dd9830b878e Mon Sep 17 00:00:00 2001 From: "Serge A. Zaitsev" Date: Sun, 30 Aug 2015 23:16:51 +0200 Subject: [PATCH] added check for fs walk errors --- zs.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/zs.go b/zs.go index a07bbdf..9ff0778 100644 --- a/zs.go +++ b/zs.go @@ -243,6 +243,11 @@ func buildAll(watch bool) { if filepath.Base(path)[0] == '.' || strings.HasPrefix(path, ".") { return nil } + // inform user about fs walk errors, but continue iteration + if err != nil { + log.Println("ERROR:", err) + return nil + } if info.IsDir() { os.Mkdir(filepath.Join(PUBDIR, path), 0755) -- 2.43.0