Subject: [sup-devel] [issue105] crash exception when viewing attachment with /s in filename

From: Álvaro Herrera <[email-masked]>@rubyforge.org
Date: Sat, 29 May 2010 02:31:27 +0000

New submission from Álvaro Herrera <[email-masked]>:

Got this exception today:

--- RuntimeError from thread: main
cannot generate tempfile `/home/alvherre/tmp/13416-9-/pgpatches/regexp'
/usr/lib/ruby/1.8/tempfile.rb:52:in `initialize'
/usr/lib/ruby/1.8/sup/message-chunks.rb:152:in `new'
/usr/lib/ruby/1.8/sup/message-chunks.rb:152:in `write_to_disk'
/usr/lib/ruby/1.8/sup/message-chunks.rb:145:in `view!'
/usr/lib/ruby/1.8/sup/modes/thread-view-mode.rb:839:in `view'
/usr/lib/ruby/1.8/sup/modes/thread-view-mode.rb:341:in `activate_chunk'
/usr/lib/ruby/1.8/sup/mode.rb:59:in `send'
/usr/lib/ruby/1.8/sup/mode.rb:59:in `handle_input'
/usr/lib/ruby/1.8/sup/buffer.rb:279:in `handle_input'
/usr/bin/sup-mail:277

The problem is that the attachment contains forward slashes in the filename, and 
this makes tempfile to raise an exception because it's expecting the directory 
to exist.

Example message: http://archives.postgresql.org/msgtxt.php?
id=[email-masked]

The attached patch (to 0.11) fixes the problem.

----------
files: msgchunks.patch
messages: 240
nosy: alvherre
priority: bug
ruby_version: 1.8
status: unread
sup_version: 0.11
title: crash exception when viewing attachment with /s in filename

_________________________________________
Sup issue tracker <[email-masked]>
<http://masanjin.net/sup-bugs/issue105>
_________________________________________

_______________________________________________
Sup-devel mailing list
[email-masked]
http://rubyforge.org/mailman/listinfo/sup-devel