@@ -108,18 +108,24 @@ def _parse_stdout(self, stdout):
108
108
out_file = line [len ("Saving " ):]
109
109
elif line .startswith ("GZip..." ):
110
110
# for gzipped outpus files are not absolute
111
+ fname = line [len ("GZip..." ):]
112
+ if len (files ) and os .path .basename (files [- 1 ]) == fname [:- 3 ]:
113
+ # we are seeing a previously reported conversion
114
+ # as being saved in gzipped form -- remove the
115
+ # obsolete, uncompressed file
116
+ files .pop ()
111
117
if isdefined (self .inputs .output_dir ):
112
118
output_dir = self .inputs .output_dir
113
119
else :
114
120
output_dir = self ._gen_filename ('output_dir' )
115
- out_file = os .path .abspath (os .path .join (output_dir , line [ len ( "GZip..." ):] ))
121
+ out_file = os .path .abspath (os .path .join (output_dir , fname ))
116
122
elif line .startswith ("Number of diffusion directions " ):
117
123
if last_added_file :
118
124
base , filename , ext = split_filename (last_added_file )
119
125
bvecs .append (os .path .join (base , filename + ".bvec" ))
120
126
bvals .append (os .path .join (base , filename + ".bval" ))
121
- elif re .search ('.*-- >(.*)' , line ):
122
- val = re .search ('.*-- >(.*)' , line )
127
+ elif re .search ('.*->(.*)' , line ):
128
+ val = re .search ('.*->(.*)' , line )
123
129
val = val .groups ()[0 ]
124
130
if isdefined (self .inputs .output_dir ):
125
131
output_dir = self .inputs .output_dir
0 commit comments