1
0
mirror of https://github.com/OfflineIMAP/offlineimap.git synced 2024-06-30 08:00:55 +02:00

Replace 2 regexes with a single one

No functional changes

Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
This commit is contained in:
Sebastian Spaeth 2011-05-05 15:59:23 +02:00 committed by Nicolas Sebrecht
parent c6259fbb86
commit 535f4592fc

View File

@ -34,8 +34,9 @@ class LocalStatusRepository(BaseRepository):
return '.'
def getfolderfilename(self, foldername):
foldername = re.sub('/\.$', '/dot', foldername)
foldername = re.sub('^\.$', 'dot', foldername)
"""Return the full path of the status file"""
# replace with 'dot' if final path name is '.'
foldername = re.sub('(^|\/)\.$','\\1dot', foldername)
return os.path.join(self.directory, foldername)
def makefolder(self, foldername):