Skip to content

Commit

Permalink
squash - Fixes for exclude_file_type
Browse files Browse the repository at this point in the history
remove unnecessary regex match for non-directory files
  • Loading branch information
alanking committed Sep 17, 2024
1 parent 10333ee commit fe0446c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion irods_capability_automated_ingest/tasks/filesystem_sync.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ def exclude_file_type(ex_list, dir_regex, file_regex, full_path, logger, mode=No
except FileNotFoundError:
return False

dir_match = any(d.match(full_path) for d in dir_regex)
if stat.S_ISDIR(mode):
dir_match = any(d.match(full_path) for d in dir_regex)
return dir_match or "directory" in ex_list

file_match = any(f.match(full_path) for f in file_regex)
Expand Down

0 comments on commit fe0446c

Please sign in to comment.