1b54b85f20
If we ask twice for a LocalStatusFolder via getfolder(), we would get a newly created instance each time. This can lead to problems, as e.g. write locks protecting files only work within the same Folder instance. Make it so, that we cache all Folder instances that we have asked for and hand back the existing one if we ask again for it, rather than recreate a new instance. Also, make getfolders() a noop for LocalStatus. We attempted to derive the foldername from the name of the LocalStatusfile. However, this is not really possible, as we do file name mangling (".$" -> "dot", "/" -> ".") and there is no way to get the original folder name from the LocalStatus file name anyway. This commit could potentially solve the "file not found" errors, that people have been seeing with their LocalStatusCache files. If we have 2 instances of a LocalStatusFolder pointing to the same file, our locking system would not work. Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de> |
||
---|---|---|
.. | ||
__init__.py | ||
Base.py | ||
Gmail.py | ||
IMAP.py | ||
LocalStatus.py | ||
Maildir.py |