Skip to content

Commit 9b09b0e

Browse files
committed
FIX: Use same copy args for related files
1 parent 2b0aef8 commit 9b09b0e

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

nipype/utils/filemanip.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -285,12 +285,15 @@ def copyfile(originalfile, newfile, copy=False, create_new=False,
285285
matofile = originalfile[:-4] + ".mat"
286286
if os.path.exists(matofile):
287287
matnfile = newfile[:-4] + ".mat"
288-
copyfile(matofile, matnfile, copy)
289-
copyfile(hdrofile, hdrnfile, copy)
288+
copyfile(matofile, matnfile, copy, create_new, hashmethod,
289+
use_hardlink)
290+
copyfile(hdrofile, hdrnfile, copy, create_new, hashmethod,
291+
use_hardlink)
290292
elif originalfile.endswith(".BRIK"):
291293
hdrofile = originalfile[:-5] + ".HEAD"
292294
hdrnfile = newfile[:-5] + ".HEAD"
293-
copyfile(hdrofile, hdrnfile, copy)
295+
copyfile(hdrofile, hdrnfile, copy, create_new, hashmethod,
296+
use_hardlink)
294297

295298
return newfile
296299

0 commit comments

Comments
 (0)