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):
165
165
self .raise_exception (runtime )
166
166
return runtime
167
167
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
+
168
176
def _gen_outfilename (self ):
169
177
out_file = self .inputs .out_file
178
+ # Generate default output filename if non specified.
170
179
if not isdefined (out_file ) and isdefined (self .inputs .in_file ):
171
180
out_file = self ._gen_fname (self .inputs .in_file , suffix = "_brain" )
181
+ # Convert to relative path to prevent BET failure
182
+ # with long paths.
172
183
return op .relpath (out_file , start = os .getcwd ())
173
184
return out_file
174
185
You can’t perform that action at this time.
0 commit comments