From 33479624380420f4cb7162600cd08aecbc276459 Mon Sep 17 00:00:00 2001 From: Ethan Dalool Date: Fri, 23 Oct 2020 07:46:29 -0700 Subject: [PATCH] Fix normalization of paths during blacklist check. --- voussoirkit/spinal.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/voussoirkit/spinal.py b/voussoirkit/spinal.py index be9d274..71ff148 100644 --- a/voussoirkit/spinal.py +++ b/voussoirkit/spinal.py @@ -689,17 +689,18 @@ def walk_generator( path.correct_case() exclude = ( - path.basename in exclude_directories or - path.absolute_path in exclude_directories + normalize(path.basename) in exclude_directories or + normalize(path.absolute_path) in exclude_directories ) + if exclude: callback_exclusion(path, 'directory') return def handle_exclusion(blacklist, basename, abspath, kind): exclude = ( - os.path.normcase(basename) in blacklist or - os.path.normcase(abspath) in blacklist + normalize(basename) in blacklist or + normalize(abspath) in blacklist ) if exclude: callback_exclusion(abspath, kind)