From 164d73e70d16b231035231597767c05e24b07a3c Mon Sep 17 00:00:00 2001 From: Louis Abel Date: Tue, 28 Mar 2023 23:18:24 -0700 Subject: [PATCH] stop using fnmatch for updates and excludes --- iso/empanadas/empanadas/util/iso_utils.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/iso/empanadas/empanadas/util/iso_utils.py b/iso/empanadas/empanadas/util/iso_utils.py index d21f841..1c1b1a2 100644 --- a/iso/empanadas/empanadas/util/iso_utils.py +++ b/iso/empanadas/empanadas/util/iso_utils.py @@ -1174,9 +1174,9 @@ class IsoBuild: for line in i: path = line.lstrip("/").rstrip("\n") if path in updatable_files: - updatables.add("*/" +path) + updatables.add(path) else: - ignores.add("*/" + path) + ignores.add(path) except Exception as e: self.log.error(Color.FAIL + 'File was likely not found.') raise SystemExit(e) @@ -1266,11 +1266,13 @@ class IsoBuild: found = False replace = False for excl in exclude: - if fnmatch(zm, excl): + #if fnmatch(zm, excl): + if excl in zm: found = True break for upda in update: - if fnmatch(zm, upda): + #if fnmatch(zm, upda): + if upda in zm: replace = True break if found: