Skip to content

Commit 8454452

Browse files
committed
fix: remove only json hash files
1 parent 1b0c69a commit 8454452

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

nipype/pipeline/engine.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1205,7 +1205,7 @@ def hash_exists(self, updatehash=False):
12051205
# of the dictionary itself.
12061206
hashed_inputs, hashvalue = self._get_hashval()
12071207
outdir = self.output_dir()
1208-
hashfiles = glob(os.path.join(outdir, '*.json'))
1208+
hashfiles = glob(os.path.join(outdir, '_0x*.json'))
12091209
if len(hashfiles) > 1:
12101210
warn('Removing multiple hashfiles and forcing node to rerun')
12111211
for hashfile in hashfiles:
@@ -1305,7 +1305,7 @@ def run(self, updatehash=False):
13051305
hashfile_unfinished)
13061306
if isinstance(self, MapNode):
13071307
# remove old json files
1308-
for filename in glob(os.path.join(outdir, '*.json')):
1308+
for filename in glob(os.path.join(outdir, '_0x*.json')):
13091309
os.unlink(filename)
13101310
outdir = make_output_dir(outdir)
13111311
self._save_hashfile(hashfile_unfinished, hashed_inputs)

0 commit comments

Comments
 (0)