Subject: [sup-talk] Adding maildir folder with a space

From: Martin Miller <[email-masked]>
Date: Fri, 07 Oct 2011 22:50:07 -0500

Hi I'm trying to add a source folder that has a space in the name, but I can't
find the right way escape the space in my URI. Currently I have this in my
sources.yaml and it's not working:

   - !masanjin.net,2006-10-01/Redwood/Maildir
   uri: maildir:/home/marty/lavabit/Acct%20Dtls
   usual: true
   archived: false
   id: 7
   labels:
   - register

This is the error I get in the log:
WARNING: problem getting messages from maildir:/home/marty/lavabit/Acct%20Dtls:
/home/marty/lavabit/Acct%20Dtls/cur not a directory 

Is it possible to use a folder name with a space?

Martin
-- 
Martin Miller
witsquash.com

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

---

From: Hamish D <[email-masked]>
Date: Sat, 8 Oct 2011 12:48:15 +0100

> find the right way escape the space in my URI.

The URI is a file path in this case, so the usual way of putting a
space in is to put a backslash in front of the space. So for
sources.yaml you could do:

uri: maildir:/home/marty/lavabit/Acct\ Dtls

Hamish

---

From: Martin Miller <[email-masked]>
Date: Sat, 08 Oct 2011 12:14:34 -0500

> uri: maildir:/home/marty/lavabit/Acct\ Dtls

I should have mentioned that I tried that before. The error looks like this:
--- URI::InvalidURIError from thread: main
bad URI(is not URI?): maildir:/home/marty/lavabit/Acct\ Dtls
/usr/lib/ruby/1.9.1/uri/common.rb:156:in `split'
/usr/lib/ruby/1.9.1/uri/common.rb:174:in `parse'
/usr/lib/ruby/1.9.1/uri/common.rb:628:in `parse'
/usr/lib/ruby/1.9.1/uri/common.rb:854:in `URI'

-- 
Martin Miller
witsquash.com

---

From: Gaute Hope <[email-masked]>
Date: Sat, 08 Oct 2011 19:53:55 +0200

> /usr/lib/ruby/1.9.1/uri/common.rb:854:in `URI'

Don't you need to have three slashes: maildir:///path/to/dir

- Gaute