[kdepim-runtime/Applications/16.12] resources/shared/singlefileresource: Fix DATA LOSS bug in ical resource which failed to create std.ics if it didn't exist.

David Faure faure at kde.org
Mon Dec 19 23:07:25 UTC 2016


On lundi 19 décembre 2016 23:01:45 CET Albert Astals Cid wrote:
> Can you clarify when the data loss happens?

It happened to me with the default setup as a new user (!)

Starting akonadi as a new user, you get a "Personal Calendar" ical resource, configured to point to $HOME/.local/share/apps/korganizer/std.ics (1)

This path typically doesn't exist for a new user (the "apps/" part of it is very kde4, korganizer in kf5 uses ~/.local/share/korganizer), and the code to mkpath the parent dir was incorrect before my fix, so the ical resource would fail to save any change. And since saving (in the writeFile() method) happens delayed (2), it's not part of the akonadi job error handling.
The resource just failed to save, almost silently, except for two qWarnings:
  akonadi_ical_resource: writeToFile() mCalendar is 0!
  akonadi_ical_resource: Error writing to file

(1) this comes from kdepim-runtime/defaultsetup/defaultcalendar.desktop
(2) see kdepim-runtime/resources/shared/singlefileresource/singlefileresourcebase.cpp

If anyone else can test the "new user setup" and either confirm my findings or prove me wrong, I'm very interested.

I was creating TODOs with zanshin, but I assume that creating events with korganizer would do the same.

> Do we need a re-release?

I would say yes, unless I'm missing something that makes this bug happen only to me (e.g. to git master users).
But AFAICS it's a consequence of the fix for bug 352693, which happened a year ago.

-- 
David Faure, faure at kde.org, http://www.davidfaure.fr
Working on KDE Frameworks 5



More information about the release-team mailing list