Skip to content

Commit 71a48a6

Browse files
committed
Merge remote-tracking branch 'upstream/maint/1.3.x' into maint/1.4.x
2 parents 92cad70 + 42df2bb commit 71a48a6

File tree

2 files changed

+14
-3
lines changed

2 files changed

+14
-3
lines changed

CHANGES.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,12 @@ A list of prominent changes can be found below. (With thanks to Lea Waller for t
156156
* ``NormalizeMotionParams`` now under ``confounds``.
157157
* ``FMRISummary``, ``CompCorVariancePlot``, ``ConfoundsCorrelationPlot`` from ``plotting``
158158

159+
1.3.7 (March 31, 2022)
160+
======================
161+
Bug-fix release in the 1.3.x series
162+
163+
* FIX: Use copy function that does not preserve mtime when creating fsaverage directories (#703)
164+
159165
1.3.6 (March 09, 2022)
160166
======================
161167
Bug-fix release in the 1.3.x series

niworkflows/interfaces/bids.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
from collections import defaultdict
2525
from json import dumps, loads
2626
from pathlib import Path
27-
from shutil import copytree, rmtree
27+
import shutil
2828
from pkg_resources import resource_filename as _pkgres
2929
import re
3030

@@ -913,10 +913,15 @@ def _run_interface(self, runtime):
913913

914914
# Finesse is overrated. Either leave it alone or completely clobber it.
915915
if dest.exists() and self.inputs.overwrite_fsaverage:
916-
rmtree(dest)
916+
shutil.rmtree(dest)
917917
if not dest.exists():
918918
try:
919-
copytree(source, dest)
919+
# Use copy instead of copy2; copy calls copymode while copy2 calls
920+
# copystat, which will preserve atime/mtime.
921+
# atime should *not* be copied to avoid triggering processes that
922+
# sweep un-accessed files.
923+
# If we want to preserve mtime, that will require a new copy function.
924+
shutil.copytree(source, dest, copy_function=shutil.copy)
920925
except FileExistsError:
921926
LOGGER.warning(
922927
"%s exists; if multiple jobs are running in parallel"

0 commit comments

Comments
 (0)