On Tue, May 10, 2016 at 01:18:29AM +0200, Łukasz Żarnowiecki wrote: > Python3 accepts binary input for md5 function. > > Signed-off-by: Łukasz Żarnowiecki <[email protected]> > --- > offlineimap/folder/Maildir.py | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/offlineimap/folder/Maildir.py b/offlineimap/folder/Maildir.py > index bda452a..95e2553 100644 > --- a/offlineimap/folder/Maildir.py > +++ b/offlineimap/folder/Maildir.py > @@ -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()).hexdigest() > + self._foldermd5 = > md5(self.getvisiblename().encode('utf-8')).hexdigest()
I'm not sure about that. I know users out there are using tricks to enable UTF-8 encoded names. I guess the MD5 will change. This was never officially supported but I know that if the MD5 changes here this will harm them. I wonder it's time to update the --migrate-md5-using-nametrans to a more generic version. Or introduce yet another CLI option. I don't know. > # Cache the full folder path, as we use getfullname() very often. > self._fullname = os.path.join(self.getroot(), self.getname()) -- Nicolas Sebrecht _______________________________________________ OfflineIMAP-project mailing list: [email protected] http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/offlineimap-project OfflineIMAP homepages: - https://github.com/OfflineIMAP - http://offlineimap.org
