Skip to content

Commit a2d7aa3

Browse files
committed
added "./" in front of all non absolute output paths for AFNI
1 parent 714b4aa commit a2d7aa3

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

nipype/interfaces/afni/base.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,10 @@ def set_default_output_type(cls, outputtype):
146146

147147
def _overload_extension(self, value):
148148
path, base, _ = split_filename(value)
149-
return os.path.join(path, base + Info.outputtype_to_ext(self.inputs.outputtype))
149+
new_path = os.path.join(path, base + Info.outputtype_to_ext(self.inputs.outputtype))
150+
#some AFNI commands assume the relative path is relative to the input not the CWD
151+
if not os.path.isabs(new_path):
152+
return "./" + new_path
150153

151154
def _list_outputs(self):
152155
outputs = super(AFNICommand, self)._list_outputs()

0 commit comments

Comments
 (0)