bin/ms_to_lmat.rb in mspire-0.3.1 vs bin/ms_to_lmat.rb in mspire-0.3.9

- old
+ new

@@ -45,10 +45,11 @@ :end_tm => times.last, :inc_tm => nil, } args.merge!(opt) lmat = LMat.new.from_times_and_spectra(times, spectra, args) - outfile = file.sub(/\.mzXML$/, opt[:newext]) + ext = File.extname(file) + outfile = file.sub(/#{Regexp.escape(ext)}$/, opt[:newext]) if args[:ascii] outfile << "a" lmat.print(outfile) else lmat.write(outfile)