From 754bf7b5c8447ed82df5fba8e27ae20f86521ae5 Mon Sep 17 00:00:00 2001 From: Nir Date: Wed, 19 Jun 2024 16:16:00 +0300 Subject: [PATCH] Attempt to fix linux test --- duplicate_files_in_folders/file_manager.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/duplicate_files_in_folders/file_manager.py b/duplicate_files_in_folders/file_manager.py index c8670ef..0295cdc 100644 --- a/duplicate_files_in_folders/file_manager.py +++ b/duplicate_files_in_folders/file_manager.py @@ -102,6 +102,8 @@ def is_allowed_path(self, path: str | Path) -> bool: # resolve all path parents path_parents = [p.resolve() for p in path.parents] + logger.debug(f"path: {path}, path_parents: {path_parents}, allowed_dirs: {self.allowed_dirs}") + # True if the path is in any of the allowed directories return any(path == allowed_dir or allowed_dir in path_parents for allowed_dir in self.allowed_dirs)