Skip to content

Commit

Permalink
Now create cur,new,tmp in '.' even if existsok is false
Browse files Browse the repository at this point in the history
Otherwise, there was a race where sometimes subfolders would get created
first in the sep = '.' scneario

fixes OfflineIMAP#64
  • Loading branch information
jgoerzen committed Aug 2, 2008
1 parent 1a15b69 commit bd1d101
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion offlineimap/repository/Maildir.py
Expand Up @@ -87,7 +87,7 @@ def makefolder(self, foldername):
# makedirs will fail because the higher-up dir already exists.
# So, check to see if this is indeed the case.

if (self.getsep() == '/' or self.getconfboolean('existsok', 0)) \
if (self.getsep() == '/' or self.getconfboolean('existsok', 0) or foldername == '.') \
and os.path.isdir(foldername):
self.debug("makefolder: %s already is a directory" % foldername)
# Already exists. Sanity-check that it's not a Maildir.
Expand Down

0 comments on commit bd1d101

Please sign in to comment.