From 76c2a7be5e5b2d6b1a4a2932707cf0de5f7cef4b Mon Sep 17 00:00:00 2001 From: Christian Schmied Date: Sat, 26 Oct 2024 19:13:32 +0200 Subject: [PATCH] fix ErrorOnlyArchiver logging Error, also when there is none --- ErrorOnlyArchiver.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ErrorOnlyArchiver.go b/ErrorOnlyArchiver.go index 20df8b1..f17bc7b 100644 --- a/ErrorOnlyArchiver.go +++ b/ErrorOnlyArchiver.go @@ -9,7 +9,9 @@ func NewErrorOnlyArchiver(conf *Config) func(string, error) { return func(filePath string, archiveErr error) { if archiveErr != nil { err := writeErrorFile(conf, filePath, archiveErr) - logger.Error(err) + if err != nil { + logger.Error(err) + } } } }