diff options
author | Kasper Timm Hansen <kaspth@gmail.com> | 2018-04-01 15:44:08 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-04-01 15:44:08 +0200 |
commit | 2c56d6324b224f3782c4da5e7ffae528293b09aa (patch) | |
tree | 9173f1bace145ab6188bf7ead324aef1133a83fc /activesupport | |
parent | 8d93107ba2554a9206a651ff2b96f2a87b061d14 (diff) | |
parent | 902b6e2bd039f55ddcf83a2c0bf4e794327e1105 (diff) | |
download | rails-2c56d6324b224f3782c4da5e7ffae528293b09aa.tar.gz rails-2c56d6324b224f3782c4da5e7ffae528293b09aa.tar.bz2 rails-2c56d6324b224f3782c4da5e7ffae528293b09aa.zip |
Merge pull request #32268 from freeletics/encrypted-tmp-file-name
Change temporary file name extension while editing encrypted file.
Diffstat (limited to 'activesupport')
-rw-r--r-- | activesupport/lib/active_support/encrypted_file.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activesupport/lib/active_support/encrypted_file.rb b/activesupport/lib/active_support/encrypted_file.rb index 671b6b6a69..c66f1b557e 100644 --- a/activesupport/lib/active_support/encrypted_file.rb +++ b/activesupport/lib/active_support/encrypted_file.rb @@ -57,7 +57,7 @@ module ActiveSupport private def writing(contents) - tmp_file = "#{content_path.basename}.#{Process.pid}" + tmp_file = "#{Process.pid}.#{content_path.basename.to_s.chomp('.enc')}" tmp_path = Pathname.new File.join(Dir.tmpdir, tmp_file) tmp_path.binwrite contents |