Skip to content

Commit

Permalink
Merge pull request #1015 from 36000/afq_data_nightly_fix
Browse files Browse the repository at this point in the history
[FIX] delete folders in AFQ derivatives when clobbering
  • Loading branch information
arokem authored Sep 8, 2023
2 parents 9166f8b + a6a0af8 commit 5687d1d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions AFQ/utils/path.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,11 @@ def apply_cmd_to_afq_derivs(

for filename in os.listdir(derivs_dir):
full_path = os.path.join(derivs_dir, filename)
if (full_path in exception_file_names)\
or (not full_path.startswith(base_fname))\
or filename.endswith("json"):
continue
if os.path.isfile(full_path) or os.path.islink(full_path):
if (full_path in exception_file_names)\
or (not full_path.startswith(base_fname))\
or filename.endswith("json"):
continue
sidecar_file = f'{drop_extension(full_path)}.json'
if op.exists(sidecar_file):
sidecar_info = read_json(sidecar_file)
Expand Down

0 comments on commit 5687d1d

Please sign in to comment.