diff options
author | francis <francis> | 2008-03-15 03:17:04 +0000 |
---|---|---|
committer | francis <francis> | 2008-03-15 03:17:04 +0000 |
commit | f51fd0291c2127b5fb446e8345a9d0ae2ce54b4b (patch) | |
tree | 9983996894e3ec3efcfbfbf06c6df3250ce4a90d | |
parent | b780a74b22d135afcb5b6317158011df67086686 (diff) |
Close stream properly.
-rw-r--r-- | app/models/incoming_message.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/models/incoming_message.rb b/app/models/incoming_message.rb index 2e6add8ee..57dd63b65 100644 --- a/app/models/incoming_message.rb +++ b/app/models/incoming_message.rb @@ -18,7 +18,7 @@ # Copyright (c) 2007 UK Citizens Online Democracy. All rights reserved. # Email: francis@mysociety.org; WWW: http://www.mysociety.org/ # -# $Id: incoming_message.rb,v 1.60 2008-03-15 03:08:55 francis Exp $ +# $Id: incoming_message.rb,v 1.61 2008-03-15 03:17:04 francis Exp $ # TODO @@ -300,7 +300,7 @@ class IncomingMessage < ActiveRecord::Base content = nil IO.popen("/usr/bin/uudecode -o -", "r+") do |child| child.print(uu) - child.flush + child.close_write content = child.read() end # Make attachment type from it, working out filename and mime type |