Skip to content

Commit

Permalink
fix no bids_dir when using option -o and post op
Browse files Browse the repository at this point in the history
  • Loading branch information
arnaudbore authored and SamGuay committed Sep 12, 2023
1 parent 490612b commit de8d37e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions dcm2bids/dcm2bids_gen.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,14 +175,14 @@ def move(self, acq, idList, post_op):
# before and after post_op
if 'custom_entities' in curr_post_op:
acq.setExtraDstFile(curr_post_op["custom_entities"])

extraDstFile = self.bids_dir / acq.extraDstFile
# Copy json file with this new set of custom entities.
shutil.copy(
str(srcFile).replace("".join(ext), ".json"),
f"{str(acq.extraDstFile)}.json",
f"{str(extraDstFile)}.json",
)
cmd = cmd.replace('dst_file',
str(acq.extraDstFile) + ''.join(ext))
str(extraDstFile) + ''.join(ext))
else:
cmd = cmd.replace('dst_file', str(dstFile))

Expand Down

0 comments on commit de8d37e

Please sign in to comment.