Re: patch to prevent mkdir '.' (inline this time!)
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
ok, so I guess I should have put it inline in the first place.
=2D-- offlineimap/offlineimap/repository/Maildir.py 2006-12-02=20
06:58:27.000000000 -0800
+++ offlineimap-fixed/offlineimap/repository/Maildir.py 2007-12-20=20
12:19:41.000000000 -0800
@@ -91,6 +91,8 @@
assert not os.path.isdir(os.path.join(foldername,=20
subdir)), \
"Tried to create folder %s but it already had=20
dir %s" %\
(foldername, subdir)
+ elif foldername =3D=3D '.':
+ self.debug("makefolder: not attempting to=20
os.makedirs('.')")
else:
self.debug("makefolder: calling makedirs %s" % foldername)
os.makedirs(foldername, 0700)
On Thursday 27 December 2007 11:52 am, David L. Emerson wrote:
> I was having trouble getting offlineimap to play nice with dovecot and=20
> kmail, and I ended up making an oddball nametrans that changes the
> name of the inbox folder to '.'
>
> dovecot_kmail_re =3D re.compile('^\.?(inbox[./])?', re.IGNORECASE)
> # fn is folder name
> def fix_dovecot_kmail (fn):
> =A0 =A0 if fn.lower() in ('inbox', '.inbox', '.'):
> =A0 =A0 =A0 =A0 return '.'
> =A0 =A0 return dovecot_kmail_re.sub('.INBOX.', fn, 1)
>=20
>=20
> The trouble is that offlineimap attempts to create the directory '.'
> and =A0crashes out. The following patch to
> offlineimap/repository/Maildir.py fixes such a problem
>=20
> (I've never used diff patches before, so hopefully this is proper)
>=20
> As englightening as that was, I don't think I have the expertise yet
> to make a patch that scans all folders before deleting/transferring
> and uses the imap copy command to reduce bandwidth usage for gmail,
> etc. :D=20
>=20
> Maybe someday
>=20
> ~David.
>=20
>=20
> -- Binary/unsupported file stripped by Ecartis --
> -- Type: text/x-diff
> -- File: patch.offlineimap_5.99.4
=2D- Binary/unsupported file stripped by Ecartis --
=2D- Type: application/x-gzip
=2D- File: patch.offlineimap_5.99.4.gz
=2D- Binary/unsupported file stripped by Ecartis --
=2D- Type: application/x-zip
=2D- File: patch.offlineimap_5.99.4.zip
|
|