Skip to content

Commit

Permalink
FIX: Test names of paths when calling path.iterdir()
Browse files Browse the repository at this point in the history
  • Loading branch information
effigies committed Jul 21, 2023
1 parent 53ccf79 commit d580459
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion niworkflows/interfaces/norm.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,9 @@ def _get_settings(self):
data_dir = load_data()
# Get a list of settings files that match the flavor.
filenames = [
i for i in data_dir.iterdir() if i.startswith(filestart) and i.endswith(".json")
path.name
for path in data_dir.iterdir()
if path.name.startswith(filestart) and path.name.endswith(".json")
]
# Return the settings files.
return [str(data_dir / f) for f in sorted(filenames)]
Expand Down

0 comments on commit d580459

Please sign in to comment.