[Kde-pim] ICal en vcard file monitoring issue.

Bertjan Broeksema b.broeksema at home.nl
Sat Jan 24 00:25:01 GMT 2009


Jason 'vanRijn' Kasper wrote:

> On Sat, Jan 17, 2009 at 7:23 AM, Volker Krause <vkrause at kde.org> wrote:
> 
>> On Friday 16 January 2009 23:21:09 Ingo Klöcker wrote:
>> > On Friday 16 January 2009, Bertjan Broeksema wrote:
>> > > Hi Pimsters,
>> > >
>> > > While testing KPilot with the setup we discussed in Osnabruck I
>> > > encountered an issue with file monitoring. The problem seems to be
>> > > that when a file is modified from korganizer (remove some item from
>> > > the calendar and close Korganizer) the file watcher seems to emit the
>> > > wrong(?) signal.
>> > >
>> > > This is what I get when I start akonadi in a terminal:
>> > >
>> > > [/home/developer/kde4/bin/akonadi_ical_resource]
>> > > akonadi_ical_resource_10(21129)/kio (KDirWatch)
>> > > KDirWatchPrivate::useINotify: inotify successfully used for
>> > > monitoring [/home/developer/kde4/bin/akonadi_ical_resource]
>> > > akonadi_ical_resource_10(21129)/kio (KDirWatch)
>> > > KDirWatch::setCreated: "KDirWatch-1" emitting created
>> > > "/home/developer/PIM/test-calendar.ics"
>> > > [/home/developer/kde4/bin/akonadi_ical_resource]
>> > > akonadi_ical_resource_10(21129)/kio (KDirWatch)
>> > > KDirWatchPrivate::removeEntry: Cancelled INotify (fd 11, 4) for
>> > > "/home/developer/PIM"
>> > > find more at: http://pastebin.ca/1310355
>> > > The problem is that the dirty signal doesn't get emitted while this
>> > > is what the SingleFileResourceBase is connect too, according to
>> > > SingleFileResourceBase.cc:50.
>> > > Please let me know if I'm correct about this and if there is some way
>> > > to fix this.
>> >
>> > My guess is that KOrganizer uses KSaveFile, i.e. the data is written to
>> > a new file which then replaces the old file. Therefore the deleted()
>> > signal and the created() signal are emitted, but not the dirty()
>> > signal.
>>
>> I noticed a similar issue in the Akonadi server, when monitoring the
>> resource
>> executable to restart them on changes. Cmake uses a delete/create
>> approach as
>> well for installation. Unfortunately we can't use KDirWatch there but are
>> limited to QFileSystemWatcher which emits only a signal for the deletion
>> and
>> omits the one for the following re-creation.
>>
>> > I guess SingleFileResourceBase should additionally listen to the
>> > deleted() and created() signals.
>>
>> Right, we might want to keep ignoring deletions though.
>>
> 
> Just following up on this... Did this ever get addressed/fixed? This is a
> huge issue for KPilot, since we'll look extremely broken with this not
> working.
> 

I think this was addressed in r913771 committed by Kevin. Please correct me 
if I'm wrong.

Cheers,

Bertjan


-------------- next part --------------
_______________________________________________
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