Subject: Re: [sup-talk] Need a simple check / nice error message for user error on mbox being a dir

From: Tero Tilus <[email-masked]>
Date: Thu, 27 Jan 2011 22:59:00 +0200

Andrei Thorp, 2011-01-27 21:16:
> Scanning mbox:/var/spool/mail/thought...
> /usr/lib/ruby/gems/1.9.1/gems/sup-0.12.1/lib/sup/mbox.rb:155:in
> `gets': Is a directory - /var/spool/mail/thought (Errno::EISDIR)
...
> Obviously a simple user error here. Would be nice if sup knew to throw
> a nicer error here. Not a big deal!

Did you mean sup should detect if mbox source actually points to a
maildir (was /var/spool/mail/thought a maildir?) and suggest a
correction to configuration or that sup wouldn't crash but reported
"/var/spool/mail/thought Is a directory. File was expected."

-- 
Tero Tilus ## 050 3635 235 ## http://tero.tilus.net/
_______________________________________________
sup-talk mailing list
[email-masked]
http://rubyforge.org/mailman/listinfo/sup-talk

---

From: Andrei Thorp <[email-masked]>
Date: Thu, 27 Jan 2011 14:16:44 -0500

Scanning mbox:/var/spool/mail/thought...
/usr/lib/ruby/gems/1.9.1/gems/sup-0.12.1/lib/sup/mbox.rb:155:in
`gets': Is a directory - /var/spool/mail/thought (Errno::EISDIR)
	from /usr/lib/ruby/gems/1.9.1/gems/sup-0.12.1/lib/sup/mbox.rb:155:in
`block in next_offset'
	from <internal:prelude>:10:in `synchronize'
	from /usr/lib/ruby/gems/1.9.1/gems/sup-0.12.1/lib/sup/mbox.rb:152:in
`next_offset'
	from /usr/lib/ruby/gems/1.9.1/gems/sup-0.12.1/lib/sup/mbox.rb:169:in
`first_new_message'
	from /usr/lib/ruby/gems/1.9.1/gems/sup-0.12.1/lib/sup/mbox.rb:139:in `poll'
	from /usr/lib/ruby/gems/1.9.1/gems/sup-0.12.1/lib/sup/poll.rb:155:in
`poll_from'
	from /usr/lib/ruby/gems/1.9.1/gems/sup-0.12.1/lib/sup/util.rb:609:in
`method_missing'
	from /usr/lib/ruby/gems/1.9.1/gems/sup-0.12.1/bin/sup-sync:123:in
`block in <top (required)>'
	from /usr/lib/ruby/gems/1.9.1/gems/sup-0.12.1/bin/sup-sync:118:in `each'
	from /usr/lib/ruby/gems/1.9.1/gems/sup-0.12.1/bin/sup-sync:118:in
`<top (required)>'
	from /usr/bin/sup-sync:19:in `load'
	from /usr/bin/sup-sync:19:in `<main>'