lib/sup/message_chunks.rb in sup-0.15.1 vs lib/sup/message_chunks.rb in sup-0.15.2
- old
+ new
@@ -203,9 +203,10 @@
## code injection through the file name.
def write_to_disk
begin
file = Tempfile.new(["sup", Shellwords.escape(@filename.gsub("/", "_")) || "sup-attachment"])
file.print @raw_content
+ file.flush
yield file if block_given?
return file.path
ensure
file.close
end