From 3e6f6bc46ef3bfa29940d1717230c55524fd649e Mon Sep 17 00:00:00 2001
From: Florez Ospina Juan Felipe <juan.florez-ospina@psi.ch>
Date: Fri, 7 Feb 2025 16:37:01 +0100
Subject: [PATCH] Remove skip directory condition when directory keywords are
 empty. Here, all paths to files should be considered.

---
 utils/g5505_utils.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/utils/g5505_utils.py b/utils/g5505_utils.py
index 622148d..a145df1 100644
--- a/utils/g5505_utils.py
+++ b/utils/g5505_utils.py
@@ -319,7 +319,7 @@ def copy_directory_with_contraints(input_dir_path, output_dir_path,
         for dirpath, _, filenames in os.walk(subpath,topdown=False):
             
             # Ensure composite keywords e.g., <keyword>/<keyword> are contained in the path
-            if not any([keyword in dirpath for keyword in select_dir_keywords]):
+            if select_dir_keywords and not any([keyword in dirpath for keyword in select_dir_keywords]):
                 continue
 
             # Reduce filenames to those that are admissible
-- 
GitLab