[PATCH] kdirwatch can not detect link change quite well

sycao sycao at redflag-linux.com
Tue Nov 25 03:09:38 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.

  best regards,
    Siyuan Cao
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<

More information about the kde-core-devel mailing list