Bug 323872 - Failure to read write-protected mbox files
Summary: Failure to read write-protected mbox files
Status: RESOLVED FIXED
Alias: None
Product: kmail2
Classification: Applications
Component: general (show other bugs)
Version: 4.10.5
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-08-21 23:43 UTC by Volker Kuhlmann
Modified: 2015-01-30 19:12 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In: 4.14.5


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Volker Kuhlmann 2013-08-21 23:43:32 UTC
As part of a mixedmaildir resource one subdirectory contains write-protected mbox files.
kmail is unable to read them: "failed to read Mbox folder .../.folder.direcotry/folder"

(At least it no longer crashes, like it used to.)

Reproducible: Always

Steps to Reproduce:
1. Create mixedmaildir resource
2. Copy a write-protected mbox file into this
3. Try to get kmail to show its content
Actual Results:  
Error message, no action.

Expected Results:  
The contents of the mbox folder to be displayed. "write-protected" still means read, copy and search are expected actions.
Comment 1 Laurent Montel 2013-08-23 08:16:56 UTC
Will look at soon.
but mixedmaildir is just for compatibility not necessary to use it for new account.
Comment 2 Volker Kuhlmann 2013-08-23 11:30:03 UTC
Thanks!
But especially for compatibility I would expect write-protected historic mbox files to be accessible easily.
Comment 3 Martin Koller 2015-01-27 22:59:19 UTC
Confirmed with 4.14.3
The pending fix is here:  https://git.reviewboard.kde.org/r/122255/
Comment 4 Martin Koller 2015-01-30 19:12:05 UTC
Git commit 4a4a56b3d64d518a881a08c32dc51138909613b7 by Martin Koller.
Committed on 30/01/2015 at 19:00.
Pushed by mkoller into branch 'KDE/4.14'.

Fix handling of read-only mbox files

Up till now a read-only mbox file could not be loaded, since load()
always tried to open in read-write mode.
Now it first tries to open the file readWrite and if that fails,
it retries readOnly.
Also one can now explicitely tell the class to open the file readOnly
even if it could be written.
Related: bug 138445
FIXED-IN: 4.14.5
REVIEW: 122255

M  +19   -2    kmbox/mbox.cpp
M  +30   -4    kmbox/mbox.h
M  +11   -4    kmbox/mbox_p.cpp
M  +46   -0    kmbox/tests/mboxtest.cpp
M  +1    -0    kmbox/tests/mboxtest.h

http://commits.kde.org/kdepimlibs/4a4a56b3d64d518a881a08c32dc51138909613b7