Skip to content

Commit

Permalink
Merge pull request #169 from UNFmontreal/BF_when_name_w_dots
Browse files Browse the repository at this point in the history
Fix if dot in dcm files names
  • Loading branch information
arnaudbore authored Jun 2, 2022
2 parents 58b0f6d + 1d541fe commit 217bdfb
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions dcm2bids/dcm2bids.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,9 @@ def move(self, acquisition, intendedForList):
for srcFile in glob(acquisition.srcRoot + ".*"):

ext = Path(srcFile).suffixes
ext = [curr_ext for curr_ext in ext if curr_ext in ['.nii','.gz',
'.json']]

dstFile = (self.bidsDir / acquisition.dstRoot).with_suffix("".join(ext))

dstFile.parent.mkdir(parents = True, exist_ok = True)
Expand Down

0 comments on commit 217bdfb

Please sign in to comment.