Skip to content

Commit

Permalink
Make parent dirs of localstatus folders.
Browse files Browse the repository at this point in the history
  • Loading branch information
jgoerzen committed Apr 17, 2008
1 parent c046383 commit cf08084
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions offlineimap/repository/LocalStatus.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
from Base import BaseRepository
from offlineimap import folder
import offlineimap.folder.LocalStatus
import os, re
import os, re, os.path

class LocalStatusRepository(BaseRepository):
def __init__(self, reposname, account):
Expand All @@ -38,8 +38,12 @@ def getfolderfilename(self, foldername):
return os.path.join(self.directory, foldername)

def makefolder(self, foldername):
# "touch" the file, truncating it.
# Create parent dirs

filename = self.getfolderfilename(foldername)
os.makedirs(os.path.dirname(foldername), 0700)

# "touch" the file, truncating it.
file = open(filename + ".tmp", "wt")
file.write(offlineimap.folder.LocalStatus.magicline + '\n')
file.flush()
Expand Down

0 comments on commit cf08084

Please sign in to comment.