summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2012-12-08 17:41:57 +0100
committerJason A. Donenfeld <Jason@zx2c4.com>2012-12-08 17:41:57 +0100
commit0c1c16bc762c57962efbf0e476ca27f6ee58d851 (patch)
tree39a7ca66059a61f182c2c4dd85ddd8313b29687c
parentMaybe this makes things almost better for python 3. (diff)
downloadgmail-notmuch-0c1c16bc762c57962efbf0e476ca27f6ee58d851.tar.xz
gmail-notmuch-0c1c16bc762c57962efbf0e476ca27f6ee58d851.zip
Create directories at stat.
-rwxr-xr-xgmail-notmuch.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/gmail-notmuch.py b/gmail-notmuch.py
index 8c69733..fba5c8c 100755
--- a/gmail-notmuch.py
+++ b/gmail-notmuch.py
@@ -52,6 +52,12 @@ def main():
destination = os.path.abspath(args[0])
+ for directory in [destination, destination + "/cur/", destination + "/new/", destination + "/tmp/"]:
+ try:
+ os.mkdir(directory, 0770)
+ except:
+ pass
+
imap, total = login(options)
database = notmuch.Database(destination, False, notmuch.Database.MODE.READ_WRITE)