From 450c7d80f860b767366f1465ec760f7d50384397 Mon Sep 17 00:00:00 2001 From: Jakob Borg Date: Thu, 11 Sep 2014 20:14:27 +0200 Subject: [PATCH] Don't crash on walk error (fixes #663) --- versioner/staggered.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/versioner/staggered.go b/versioner/staggered.go index 5e1a66d8c..ac666de04 100644 --- a/versioner/staggered.go +++ b/versioner/staggered.go @@ -59,6 +59,9 @@ func versionExt(path string) string { // Rename versions with old version format func (v Staggered) renameOld() { err := filepath.Walk(v.versionsPath, func(path string, f os.FileInfo, err error) error { + if err != nil { + return err + } if f.Mode().IsRegular() { versionUnix, err := strconv.ParseInt(strings.Replace(filepath.Ext(path), ".v", "", 1), 10, 0) if err == nil {