Blame SOURCES/sos-bz1912910-empty-file-stops-collecting.patch

bffc8a
From 03642cf2e5619f11c762b63c61c9c69fb2b00cdf Mon Sep 17 00:00:00 2001
bffc8a
From: Pavel Moravec <pmoravec@redhat.com>
bffc8a
Date: Tue, 8 Dec 2020 19:33:07 +0100
bffc8a
Subject: [PATCH] [plugins] Dont stop collecting by empty specfile when
bffc8a
 sizelimit=0
bffc8a
bffc8a
When sizelimit=0, collecting an empty file would set limit_reached
bffc8a
wrongly and stop collecting further files. Let fix this corner case.
bffc8a
bffc8a
Resolves: #2330
bffc8a
bffc8a
Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
bffc8a
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
bffc8a
---
bffc8a
 sos/report/plugins/__init__.py | 2 +-
bffc8a
 1 file changed, 1 insertion(+), 1 deletion(-)
bffc8a
bffc8a
diff --git a/sos/report/plugins/__init__.py b/sos/report/plugins/__init__.py
bffc8a
index deb46c93..510e116e 100644
bffc8a
--- a/sos/report/plugins/__init__.py
bffc8a
+++ b/sos/report/plugins/__init__.py
bffc8a
@@ -1483,7 +1483,7 @@ class Plugin(object):
bffc8a
                     self._add_copy_paths([_file])
bffc8a
                     # in the corner case we just reached the sizelimit, we
bffc8a
                     # should collect the whole file and stop
bffc8a
-                    limit_reached = (current_size == sizelimit)
bffc8a
+                    limit_reached = (sizelimit and current_size == sizelimit)
bffc8a
             if self.manifest:
bffc8a
                 self.manifest.files.append({
bffc8a
                     'specification': copyspec,
bffc8a
-- 
bffc8a
2.26.2
bffc8a