Skip to content

Commit

Permalink
fix the raw commands handling of MAILDIR; fix the make commands creat…
Browse files Browse the repository at this point in the history
…ion of sub-maildirs
  • Loading branch information
nicferrier committed Sep 27, 2011
1 parent 40d36ec commit 207710f
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/md
Expand Up @@ -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"))
Expand Down Expand Up @@ -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):
Expand Down

0 comments on commit 207710f

Please sign in to comment.