diff options
Diffstat (limited to 'app/models/raw_email.rb')
-rw-r--r-- | app/models/raw_email.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/raw_email.rb b/app/models/raw_email.rb index c6f84318b..6e073aa27 100644 --- a/app/models/raw_email.rb +++ b/app/models/raw_email.rb @@ -43,7 +43,7 @@ class RawEmail < ActiveRecord::Base if !File.exists?(self.directory) FileUtils.mkdir_p self.directory end - File.open(self.filepath, "wb") { |file| + File.atomic_write(self.filepath) { |file| file.write d } end |