From mboxrd@z Thu Jan 1 00:00:00 1970 From: magnus@therning.org (Magnus Therning) Date: Fri, 14 Sep 2007 23:44:26 +0100 Subject: [sup-talk] Tilde in maildir/mbox paths In-Reply-To: <20070914213823.GA3321@die.therning.org> References: <20070907073721.GA10465@die.therning.org> <1189737312-sup-2958@south> <20070914213823.GA3321@die.therning.org> Message-ID: <20070914224426.GA4460@die.therning.org> On Fri, Sep 14, 2007 at 22:38:23 +0100, Magnus Therning wrote: >On Thu, Sep 13, 2007 at 19:45:56 -0700, William Morgan wrote: >>Hi Magnus, >> >>Excerpts from Magnus Therning's message of Fri Sep 07 00:37:21 -0700 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. >> >>Thanks for the patch! What about modifying this slightly so that the >>~-expansion is done at the string level instead of the URI level, in a >>method called Source#expand_filesystem_uri or something. Then Maildir >>and MBox::Loader sticks the output of that method into URI. >> >>I think that change will solve two problems: it will make clear that >>the expansion method is filesystem-specific (i.e. even though the >>method is in Source, only filesystem sources want to call it), and it >>will allow us to support URIs the "right way", without the weird >>#opaque stuff and without dropping all mbox:// and maildir:// URLs. >>What do you think? > >File.expand_path requires the tilde to be at the start of its argument, >so that prompted the strange #opaque stuff. I made some changes and >stuck a modified patch in the attachment. Let me know what you think. This time with the attachment... /M -- Magnus Therning (OpenPGP: 0xAB4DFBA4) magnus?therning?org Jabber: magnus?therning?gmail?com http://therning.org/magnus Of course I laugh at my own jokes. You can't trust strangers. -- Phyllis Diller -------------- next part -------------- A non-text attachment was scrubbed... Name: sup_529-1.diff Type: text/x-diff Size: 1444 bytes Desc: not available Url : http://rubyforge.org/pipermail/sup-talk/attachments/20070914/79e8f0e8/attachment-0002.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/20070914/79e8f0e8/attachment-0003.bin