File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -165,10 +165,21 @@ def _run_interface(self, runtime):
165165 self .raise_exception (runtime )
166166 return runtime
167167
168+ def _format_arg (self , name , spec , value ):
169+ formatted = super (BET , self )._format_arg (name , spec , value )
170+ if name == "in_file" :
171+ # Convert to relative path to prevent BET failure
172+ # with long paths.
173+ return op .relpath (formatted , start = os .getcwd ())
174+ return formatted
175+
168176 def _gen_outfilename (self ):
169177 out_file = self .inputs .out_file
178+ # Generate default output filename if non specified.
170179 if not isdefined (out_file ) and isdefined (self .inputs .in_file ):
171180 out_file = self ._gen_fname (self .inputs .in_file , suffix = "_brain" )
181+ # Convert to relative path to prevent BET failure
182+ # with long paths.
172183 return op .relpath (out_file , start = os .getcwd ())
173184 return out_file
174185
You can’t perform that action at this time.
0 commit comments