From 1578c7207bcd52c3089cc1d8ad0e7fb688d91fa3 Mon Sep 17 00:00:00 2001 From: Go MAEDA Date: Wed, 18 Aug 2021 02:34:46 +0000 Subject: [PATCH] Fix that binmode specified twice (#35539, #35720). MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Patch by Pavel Rosický. git-svn-id: http://svn.redmine.org/redmine/trunk@21193 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/models/attachment.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/attachment.rb b/app/models/attachment.rb index c65c56722..8fba26eff 100644 --- a/app/models/attachment.rb +++ b/app/models/attachment.rb @@ -571,7 +571,7 @@ class Attachment < ActiveRecord::Base name = "#{timestamp}_#{ascii}" File.open( File.join(path, name), - flags: File::CREAT | File::EXCL | File::BINARY | File::WRONLY, + flags: File::CREAT | File::EXCL | File::WRONLY, binmode: true, &block ) -- 2.39.5