Bug 122708 - Reads of list-valued custom iCal properties return only final list member
Summary: Reads of list-valued custom iCal properties return only final list member
Status: RESOLVED FIXED
Alias: None
Product: kresources
Classification: Miscellaneous
Component: framework (show other bugs)
Version: unspecified
Platform: Debian testing Linux
: NOR normal
Target Milestone: ---
Assignee: Cornelius Schumacher
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-02-25 19:56 UTC by Isaac Wilcox
Modified: 2006-03-04 11:07 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Isaac Wilcox 2006-02-25 19:56:42 UTC
Version:            (using KDE KDE 3.5.1)
Installed from:    Debian testing/unstable Packages

Hi,

See bug 122643, but briefly, tstaerk worked out that if you load an iCal file with a custom entry like:
  X-KDE-karm-desktopList:1,2,3
then libkcal (well, readCustomProperties()) only returns the final value, rather than the list.

Cheers,

Zak (Isaac Wilcox)
Comment 1 Reinhold Kainhofer 2006-02-26 18:23:22 UTC
Am Sonntag, 26. Februar 2006 11:38 schrieb thorsten@staerk.de:
> Dear List,
>
> Isaac pointed me to a very interesting problem in bugs.kde.org/122643.
> kArm stores a "desktoplist" for each task, associating a list of desktops,
> e.g. "1,2,3" with a task. This desktop list is a custom property
> (X-KDE-karm-desktopList) within the iCal file. Saving and loading worked
> fine with KDE 3.4.
> With KDE 3.5, saving still works fine, but loading no longer.
>
> As I can tell from debugging icalformatimpl.cpp, function
> ICalFormatImpl::readCustomProperties (thanks Adriaan for the good work),
> libical no longer reads X-KDE-karm-desktoplist no longer as "1,2,3", but
> as "1", then again as "2", then again as "3", thus overwriting this 
> property so only the last element in the comma-separated list is left.


The problem is simply that we lack a method to read custom lists...
We can't just read 
    X-KDE-karm-desktoplist: 1,2,3
as "1,2,3", since that will terribly fail for cases like:
    X-KDE-Some-ListTest:"a\,b","c\,d"
which is a list of two elements ('a,b' and 'c,d', without the quotes). The 
parser already un-escapes the commas, so the proposed behavior would return 
'a,b,c,d', which is a list of four values....

Cheers,
Reinhold
Comment 2 Thorsten Staerk 2006-03-04 11:07:35 UTC
karm as well as Reinhold's escaping-usecase now works with commit
http://websvn.kde.org/trunk/KDE/kdepim/libkcal/tests/cal?rev=515421&view=rev

Note that this fix will not go into KDE 3.5.x, but into KDE 4