lib/scissor/writer.rb in scissor-0.0.25 vs lib/scissor/writer.rb in scissor-0.0.26

- old
+ new

@@ -70,10 +70,11 @@ run_command(cmd.join(' ')) end def to_file(filename, options) filename = Pathname.new(filename) + full_filename = filename.expand_path if @tracks.flatten.empty? raise EmptyFragment end @@ -100,12 +101,12 @@ end mix_files(tmpfiles, final_tmpfile = tmpdir + 'tmp.wav') if filename.extname == '.wav' - File.rename(final_tmpfile, filename) + File.rename(final_tmpfile, full_filename) else - run_command("ffmpeg -ab #{options[:bitrate]} -i \"#{final_tmpfile}\" \"#{filename}\"") + run_command("ffmpeg -ab #{options[:bitrate]} -i \"#{final_tmpfile}\" \"#{full_filename}\"") end end end def which(command)