From 5a07f9ddeed909e69bd98f81ccc0135dc52defe1 Mon Sep 17 00:00:00 2001 From: Jakob Borg Date: Tue, 5 Aug 2014 09:44:35 +0200 Subject: [PATCH] Woops: don't consider all close()s to be failures... --- model/puller.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/model/puller.go b/model/puller.go index 7d1a982b1..fbf69e2af 100644 --- a/model/puller.go +++ b/model/puller.go @@ -675,8 +675,10 @@ func (p *puller) closeFile(f protocol.FileInfo) { of := p.openFiles[f.Name] err := of.file.Close() - p.errors++ - l.Infof("close: error: %q / %q: %v", p.repoCfg.ID, f.Name, err) + if err != nil { + p.errors++ + l.Infof("close: error: %q / %q: %v", p.repoCfg.ID, f.Name, err) + } defer os.Remove(of.temp) delete(p.openFiles, f.Name)