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

Volker Krause vkrause at kde.org
Sat Jan 17 12:23:55 GMT 2009


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.

regards
Volker
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-pim/attachments/20090117/380cb2a0/attachment.sig>
-------------- 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