From: Marius Balteanu Date: Sat, 11 Sep 2021 10:08:37 +0000 (+0000) Subject: Disable Lint/DuplicateBranch in lib/redmine/export/pdf.rb#107 (#35683). X-Git-Tag: 5.0.0~238 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=e551c0cb0092088510c66dea3e8bcaf87f93c08e;p=redmine.git Disable Lint/DuplicateBranch in lib/redmine/export/pdf.rb#107 (#35683). git-svn-id: http://svn.redmine.org/redmine/trunk@21219 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- diff --git a/lib/redmine/export/pdf.rb b/lib/redmine/export/pdf.rb index cba4167b4..3b9df94e1 100644 --- a/lib/redmine/export/pdf.rb +++ b/lib/redmine/export/pdf.rb @@ -104,10 +104,12 @@ module Redmine atta = RDMPdfEncoding.attach(@attachments, attrname, "UTF-8") if atta return atta.diskfile + # rubocop:disable Lint/DuplicateBranch elsif %r{/attachments/download/(?[^/]+)/} =~ attrname and atta = @attachments.find{|a| a.id.to_s == id} and atta.readable? and atta.visible? return atta.diskfile + # rubocop:enable Lint/DuplicateBranch elsif %r{/attachments/thumbnail/(?[^/]+)/(?\d+)} =~ attrname and atta = @attachments.find{|a| a.id.to_s == id} and atta.readable? and atta.visible?