[sup-talk] Tilde in maildir/mbox paths
Magnus Therning
magnus at therning.org
Fri Sep 7 03:37:21 EDT 2007
I find it useful to be able to stick '~' in paths so here's an attempt
at a patch that allows a source with the URI maildir:~/mail/in.
Two comments:
1. I didn't really know where to stick expand_uri so it's duplicated in
Maildir and Mbox. This is far from ideal. Please tell me where it
belongs.
2. Parsing URIs of the form maildir://~/mail/in seems to be
problematic:
irb(main):001:0> require 'uri'
=> true
irb(main):002:0> URI('maildir://~/mail/in')
URI::InvalidURIError: the scheme maildir does not accept registry part: ~ (or bad hostname?)
from /usr/lib/ruby/1.8/uri/generic.rb:195:in `initialize'
from /usr/lib/ruby/1.8/uri/common.rb:492:in `new'
from /usr/lib/ruby/1.8/uri/common.rb:492:in `parse'
from /usr/lib/ruby/1.8/uri/common.rb:608:in `URI'
from (irb):2
from :0
I don't know how to get around this so I changed the help text for
sup-add.
/M
--
Magnus Therning (OpenPGP: 0xAB4DFBA4)
magnus@therning.org Jabber: magnus.therning@gmail.com
http://therning.org/magnus
As we enjoy great advantages from the inventions of others we should
be glad of an opportunity to serve others by any invention of
ours, and this we should do freely and generously.
-- Benjamin Franklin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sup_514-1.diff
Type: text/x-diff
Size: 2454 bytes
Desc: not available
Url : http://rubyforge.org/pipermail/sup-talk/attachments/20070907/6f68e559/attachment.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://rubyforge.org/pipermail/sup-talk/attachments/20070907/6f68e559/attachment-0001.bin
More information about the sup-talk
mailing list