From 3ec68b57cca2138ddff72fd828d554dc2678c44d Mon Sep 17 00:00:00 2001 From: Dimitri Papadopoulos Orfanos <3234522+DimitriPapadopoulos@users.noreply.github.com> Date: Sun, 6 Oct 2024 17:37:44 +0200 Subject: [PATCH] STY: Further simplification Co-authored-by: Chris Markiewicz --- nipype/pipeline/engine/utils.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/nipype/pipeline/engine/utils.py b/nipype/pipeline/engine/utils.py index adb1d34abf..ef03c52839 100644 --- a/nipype/pipeline/engine/utils.py +++ b/nipype/pipeline/engine/utils.py @@ -1485,8 +1485,6 @@ def clean_working_directory( if f not in needed_files: if not f.startswith(tuple(needed_dirs)): files2remove.append(f) - elif not any(f.startswith(dname) for dname in needed_dirs): - files2remove.append(f) else: if not str2bool(config["execution"]["keep_inputs"]): input_files = []