Skip to content

Commit

Permalink
Minor bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
marcelzwiers committed Sep 27, 2024
1 parent 3d19215 commit e845fab
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bidscoin/bidscoiner.py
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ def bidscoiner(sourcefolder: str, bidsfolder: str, participant: list=(), force:
bidssession = bidsfolder/subid/sesid # TODO: Support DICOMDIR with multiple subjects (as in PYDICOMDIR)
if not force and bidssession.is_dir():
datatypes = set()
for datatype in [dtype for dtype in lsdirs(bidssession) if next(dtype.iterdir())]: # See what non-empty datatypes we already have in the bids session-folder
for datatype in [dtype for dtype in lsdirs(bidssession) if next(dtype.iterdir(), None)]: # See what non-empty datatypes we already have in the bids session-folder
for dataformat in bidsmap.dataformats:
if datatype.name in dataformat.datatypes: # See if we are going to add data for this datatype
datatypes.add(datatype.name)
Expand Down

0 comments on commit e845fab

Please sign in to comment.