Skip to content

Commit

Permalink
Fixed a recursive file copy issue.
Browse files Browse the repository at this point in the history
  • Loading branch information
bryjcannon committed Nov 28, 2023
1 parent 9b7fa30 commit 62dd7cc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ark/segmentation/ez_seg/ez_seg_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def find_and_copy_files(names: List, source_folder: Union[str, List[str]], desti
files_to_copy = []
for root, dirs, files in os.walk(source_folder):
for file in files:
if pattern.match(file):
if pattern.match(file) and destination_folder not in file:
files_to_copy.append(os.path.join(root, file))

# Copy the found files to the destination folder
Expand Down

0 comments on commit 62dd7cc

Please sign in to comment.