Skip to content

Commit 8595e94

Browse files
committed
RF: Permit mmap for uncompressed files; no longer writing to same file
1 parent c5bb08c commit 8595e94

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

niworkflows/interfaces/bids.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -587,9 +587,7 @@ def _run_interface(self, runtime):
587587
) and not out_file.name.endswith((".dtseries.nii", ".dtseries.nii.gz"))
588588
data_dtype = self.inputs.data_dtype or DEFAULT_DTYPES[self.inputs.suffix]
589589
if is_nifti and any((self.inputs.check_hdr, data_dtype)):
590-
# Do not use mmap; if we need to access the data at all, it will be to
591-
# rewrite, risking a BusError
592-
nii = nb.load(orig_file, mmap=False)
590+
nii = nb.load(orig_file)
593591

594592
if self.inputs.check_hdr:
595593
hdr = nii.header

0 commit comments

Comments
 (0)