From 6e94871086ef8ae41fdc38f65089751657d6a0c3 Mon Sep 17 00:00:00 2001 From: Euan Kemp Date: Wed, 18 Jan 2017 16:18:36 -0800 Subject: [PATCH] Ignore spurious filesystem changes --- fs/fs.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/fs/fs.go b/fs/fs.go index 5b9f3f2243..dfa5ec12c8 100644 --- a/fs/fs.go +++ b/fs/fs.go @@ -495,6 +495,10 @@ func GetDirInodeUsage(dir string, timeout time.Duration) (uint64, error) { inodes := map[uint64]struct{}{} err = filepath.Walk(dir, func(path string, info os.FileInfo, err error) error { + if os.IsNotExist(err) { + // expected if files appear/vanish + return nil + } if err != nil { return fmt.Errorf("unable to count inodes for part of dir %s: %s", dir, err) }