[PATCH] kdirwatch can not detect link change quite well

sycao sycao at redflag-linux.com
Tue Nov 25 03:16:23 GMT 2008

Hi, all
    I don't know where is best ML to post, so I post to both kde-devel
and kde-core-devel.
the problem comes up  when  I  traced the problem when using kcmshell4
to set timezone, which is when you changed timezone second time,
the setting just lost. Leo peng and I have tried to fix it, and I found
the real problem is that
KDirWatch loses watch on /etc/localtime ( in ktimezoned ).

   I can reproduce the watch lose very easily:
   # inotifywait -m /etc/localtime
   # zic -l Asia/Shanghai
   # zic -l Asia/Muscat
   # touch /etc/localtime

After Change timezone to Muscat, subsequent changes to /etc/localtime
won't be watched. because KDirWatch use inotify, which monitoring file
with respect to inode , not dir entry. zic relink ( hardlink )
/etc/localtime, so inotify just tells attrib change ( st_nlink change )
of the original file.
I try hard to fix the problem and it works right now. please check it if
there are any problems.

the patches works both for 4.1.3 and trunk
  best regards,
    Siyuan Cao

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: kio-kdirwatch-hardlink.patch
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20081125/c265dd3d/attachment.ksh>
-------------- next part --------------
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<

More information about the kde-core-devel mailing list