From 2f070737594e5d1920c410664dc742456838c075 Mon Sep 17 00:00:00 2001 From: "Felix C. Stegerman" Date: Mon, 31 Aug 2020 20:01:35 +0200 Subject: [PATCH] make include_exts etc. properly case-insentitive --- buildozer/__init__.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/buildozer/__init__.py b/buildozer/__init__.py index ba1447a..5184a80 100644 --- a/buildozer/__init__.py +++ b/buildozer/__init__.py @@ -695,6 +695,12 @@ class Buildozer: '') app_dir = self.app_dir + include_exts = [ext.lower() for ext in include_exts] + exclude_exts = [ext.lower() for ext in exclude_exts] + exclude_dirs = [dir.lower() for dir in exclude_dirs] + exclude_patterns = [pat.lower() for pat in exclude_patterns] + include_patterns = [pat.lower() for pat in include_patterns] + self.debug('Copy application source from {}'.format(source_dir)) rmtree(self.app_dir) @@ -716,7 +722,7 @@ class Buildozer: for exclude_dir in exclude_dirs: if exclude_dir[-1] != '/': exclude_dir += '/' - if filtered_root.startswith(exclude_dir.lower()): + if filtered_root.startswith(exclude_dir): is_excluded = True break @@ -760,7 +766,7 @@ class Buildozer: # TODO more filters basename, ext = splitext(fn) if ext: - ext = ext[1:] + ext = ext[1:].lower() if include_exts and ext not in include_exts: continue if exclude_exts and ext in exclude_exts: