Revert some previous attempts at localstatus creation

refs deb#479798

Reverts cf080844ac
and 031e018ead
This commit is contained in:
John Goerzen 2008-05-06 18:23:48 -05:00
parent f103c54801
commit fe1d92f00e

View File

@ -19,7 +19,7 @@
from Base import BaseRepository from Base import BaseRepository
from offlineimap import folder from offlineimap import folder
import offlineimap.folder.LocalStatus import offlineimap.folder.LocalStatus
import os, re, os.path import os, re
class LocalStatusRepository(BaseRepository): class LocalStatusRepository(BaseRepository):
def __init__(self, reposname, account): def __init__(self, reposname, account):
@ -38,13 +38,8 @@ class LocalStatusRepository(BaseRepository):
return os.path.join(self.directory, foldername) return os.path.join(self.directory, foldername)
def makefolder(self, foldername): def makefolder(self, foldername):
# Create parent dirs
filename = self.getfolderfilename(foldername)
if not os.path.isdir(os.path.dirname(filename)):
os.makedirs(os.path.dirname(filename), 0700)
# "touch" the file, truncating it. # "touch" the file, truncating it.
filename = self.getfolderfilename(foldername)
file = open(filename + ".tmp", "wt") file = open(filename + ".tmp", "wt")
file.write(offlineimap.folder.LocalStatus.magicline + '\n') file.write(offlineimap.folder.LocalStatus.magicline + '\n')
file.flush() file.flush()