Skip to content

Commit d580459

Browse files
committed
FIX: Test names of paths when calling path.iterdir()
1 parent 53ccf79 commit d580459

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

niworkflows/interfaces/norm.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,9 @@ def _get_settings(self):
169169
data_dir = load_data()
170170
# Get a list of settings files that match the flavor.
171171
filenames = [
172-
i for i in data_dir.iterdir() if i.startswith(filestart) and i.endswith(".json")
172+
path.name
173+
for path in data_dir.iterdir()
174+
if path.name.startswith(filestart) and path.name.endswith(".json")
173175
]
174176
# Return the settings files.
175177
return [str(data_dir / f) for f in sorted(filenames)]

0 commit comments

Comments
 (0)