oscap-anaconda-addon/oscap-anaconda-addon-2.0.1-fix_archive_handling-PR_170.patch
Matej Tyc b20d8baf36 Port various fixes:
- Fix handling of content archives
- Fix handling of content fingerprint
- Fix crash when a previously selected hardening has been cancelled
- Pull latest translations

Resolves: rhbz#1996129
Resolves: rhbz#1993065
Resolves: rhbz#2014108
2021-11-10 13:48:42 +01:00

15 lines
839 B
Diff

diff --git a/org_fedora_oscap/content_discovery.py b/org_fedora_oscap/content_discovery.py
index bc14ef1..ccfe6c8 100644
--- a/org_fedora_oscap/content_discovery.py
+++ b/org_fedora_oscap/content_discovery.py
@@ -225,7 +225,8 @@ def _gather_available_files(self, actually_fetched_content, dest_filename):
if not dest_filename: # using scap-security-guide
fpaths = [self.DEFAULT_SSG_DATA_STREAM_PATH]
else: # Using downloaded XCCDF/OVAL/DS/tailoring
- fpaths = glob(str(self.CONTENT_DOWNLOAD_LOCATION / "*.xml"))
+ fpaths = pathlib.Path(self.CONTENT_DOWNLOAD_LOCATION).rglob("*")
+ fpaths = [str(p) for p in fpaths if p.is_file()]
else:
dest_filename = pathlib.Path(dest_filename)
# RPM is an archive at this phase