Patch #32924

Creating tmp/pdf directory is no longer necessary

Added by Go MAEDA 27 days ago. Updated 22 days ago.

Status:NewStart date:
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:Code cleanup/refactoring
Target version:4.2.0

Description

We can remove the following code because tmp/pdf directory that is used when generating pdf files is no longer used after r13358.

Curentry, the PDF library rbpdf uses tmp instead of tmp/pdf as a temporary directory.

diff --git a/lib/redmine/export/pdf.rb b/lib/redmine/export/pdf.rb
index 85beb8bdb..e43459b08 100644
--- a/lib/redmine/export/pdf.rb
+++ b/lib/redmine/export/pdf.rb
@@ -28,8 +28,6 @@ module Redmine
         attr_accessor :footer_date

         def initialize(lang, orientation='P')
-          @@k_path_cache = Rails.root.join('tmp', 'pdf')
-          FileUtils.mkdir_p @@k_path_cache unless File::exist?(@@k_path_cache)
           set_language_if_valid lang
           super(orientation, 'mm', 'A4')
           set_print_header(false)

0001-tmp-pdf-directory-is-no-longer-necessary.patch Magnifier (999 Bytes) Go MAEDA, 2020-01-30 04:45


Related issues

Related to Redmine - Defect #12189: Missing tmp/pdf directory Closed

History

#1 Updated by Go MAEDA 27 days ago

#2 Updated by Go MAEDA 22 days ago

  • Target version set to 4.2.0

Setting the target version to 4.2.0.

Also available in: Atom PDF