Patch #32924

tmp/pdf directory is no longer necessary

Added by Go MAEDA 8 months ago. Updated 7 months ago.

Status:ClosedStart date:
Priority:NormalDue date:
Assignee:Go MAEDA% 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

Associated revisions

Revision 19547
Added by Go MAEDA 7 months ago

tmp/pdf directory is no longer necessary (#32924).

Patch by Go MAEDA.

History

#1 Updated by Go MAEDA 8 months ago

#2 Updated by Go MAEDA 8 months ago

  • Target version set to 4.2.0

Setting the target version to 4.2.0.

#3 Updated by Go MAEDA 7 months ago

  • Status changed from New to Closed
  • Assignee set to Go MAEDA

Committed the patch.

#4 Updated by Go MAEDA 7 months ago

  • Subject changed from Creating tmp/pdf directory is no longer necessary to tmp/pdf directory is no longer necessary

Also available in: Atom PDF