Revert some previous attempts at localstatus creation
refs deb#479798 Revertscf080844ac
and031e018ead
This commit is contained in:
parent
f103c54801
commit
fe1d92f00e
@ -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()
|
||||||
|
Loading…
Reference in New Issue
Block a user