[Kde-pim] Review Request 122255: fix handling of read-only mbox files

Martin Koller kollix at aon.at
Tue Jan 27 22:55:33 GMT 2015


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/122255/
-----------------------------------------------------------

(Updated Jan. 27, 2015, 10:55 p.m.)


Review request for KDEPIM-Libraries and Laurent Montel.


Changes
-------

added unit tests.

In preparation of another fix which is needed in the mbox resource (which currently ignores the read-only flag set in its configuration),
I added 2 new methods (setReadOnly() and isReadOnly())

The diff also contains some docu fixes (e.g. it said that purge() operates on the last fileName passed to the save() call, which
was not implemented like that)


Bugs: 138445 and 323872
    http://bugs.kde.org/show_bug.cgi?id=138445
    http://bugs.kde.org/show_bug.cgi?id=323872


Repository: kdepimlibs


Description
-------

The KMBox class did not correctly handle read-only files.
This patch now tries to first open the file readWrite and if that fails, it retries readOnly.

This fixes the mentioned bug with mixedmaildir but you now can also open readOnly mbox files with the mbox resource.
(Using the checkbox "readonly" in mbox resource settings did not work at all)


Diffs (updated)
-----

  kmbox/tests/mboxtest.cpp a3b6ee9 
  kmbox/mbox.h d11e454 
  kmbox/mbox.cpp 60632f3 
  kmbox/mbox_p.cpp f0e67a0 
  kmbox/tests/mboxtest.h 6b19153 

Diff: https://git.reviewboard.kde.org/r/122255/diff/


Testing
-------

yes


Thanks,

Martin Koller

_______________________________________________
KDE PIM mailing list kde-pim at kde.org
https://mail.kde.org/mailman/listinfo/kde-pim
KDE PIM home page at http://pim.kde.org/



More information about the kde-pim mailing list