From 207710f1ec006daa05c144af68ca06ccaa3912aa Mon Sep 17 00:00:00 2001 From: Nic Ferrier Date: Tue, 27 Sep 2011 14:31:53 +0100 Subject: [PATCH] fix the raw commands handling of MAILDIR; fix the make commands creation of sub-maildirs --- src/md | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/md b/src/md index b8861bb..2d4763c 100755 --- a/src/md +++ b/src/md @@ -127,7 +127,8 @@ class MdCLI(cmdln.Cmdln): If the path is relative then create under MAILDIR else create at the absolute location. """ - d = path if path[0] == "/" else joinpath(self.maildir, path) + # Do we need to make this ".path" if it's relative? + d = path if path[0] == "/" else joinpath(self.maildir, "." + path) os.makedirs(joinpath(d, "cur")) os.makedirs(joinpath(d, "new")) os.makedirs(joinpath(d, "tmp")) @@ -162,13 +163,11 @@ class MdCLI(cmdln.Cmdln): client.gettext(message, sys.stdout) def do_raw(self, subcmd, opts, message): - maildir = getattr(self.options, "maildir",MAILDIR) - client = MdClient(maildir) + client = MdClient(self.maildir) client.getraw(message, sys.stdout) def do_rawpart(self, subcmd, opts, message): - maildir = getattr(self.options, "maildir",MAILDIR) - client = MdClient(maildir) + client = MdClient(self.maildir) client.getrawpart(message, sys.stdout) def do_struct(self, subcmd, opts, message):