From 83112a21e14028b1f60a942193100c3c2813fa1e Mon Sep 17 00:00:00 2001 From: wangliyao <755210570@qq.com> Date: Thu, 17 Dec 2020 17:57:00 +0800 Subject: [PATCH] fix --- lib/paperclip/paperclip_processors/transcoder.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/paperclip/paperclip_processors/transcoder.rb b/lib/paperclip/paperclip_processors/transcoder.rb index d67efea..6e319b0 100755 --- a/lib/paperclip/paperclip_processors/transcoder.rb +++ b/lib/paperclip/paperclip_processors/transcoder.rb @@ -50,7 +50,6 @@ def make if @meta log "Transcoding supported file #{@file.path}" @cli.add_source(@file.path) - @cli.add_destination(dst.path) @cli.reset_input_filters if output_is_image? @@ -71,6 +70,8 @@ def make end end end + + @cli.add_destination(dst.path) begin @cli.run @@ -83,7 +84,7 @@ def make # If the file is not supported, just return it dst << @file.read dst.close - end + end dst end