Fix md5 folder generation wanting unicode

Using standard offlineimap without specific utf8 nametrans makes
offlineimap crash when generating md5 of the folder because the
foldername is already an str.

Signed-off-by: Stéphane Albert <sheeprine@oh.its.fake.nullplace.com>
This commit is contained in:
Stéphane Albert 2016-10-31 15:48:26 +01:00
parent a5e32929b6
commit 9f280c0eaa
1 changed files with 1 additions and 1 deletions

View File

@ -71,7 +71,7 @@ class MaildirFolder(BaseFolder):
# Everything up to the first comma or colon (or ! if Windows):
self.re_prefixmatch = re.compile('([^'+ self.infosep + ',]*)')
# folder's md, so we can match with recorded file md5 for validity.
self._foldermd5 = md5(self.getvisiblename().encode('utf-8')).hexdigest()
self._foldermd5 = md5(self.getvisiblename()).hexdigest()
# Cache the full folder path, as we use getfullname() very often.
self._fullname = os.path.join(self.getroot(), self.getname())
# Modification time from 'Date' header.