problem with KIO::NetAccess and KDirLister/KFileTreeView

David Faure david at
Mon Oct 7 17:58:47 BST 2002

Hash: SHA1

On Monday 07 October 2002 18:41, Klaas Freitag wrote:
> > If that's the case, then I'd guess KDirWatch got broken. Try "touch newfile" from
> > a terminal to see if it notices it.
> Yes, that works with beta 3.1 as well as with 3.0.x. As it also works if I
> comment out the del-line, I fear that KDirLister deletes the FileItem it just
> needs to add. Maybe a caching problem? But I am not familiar with KDirLister ;-)

I don't think the problem is in KDirLister. You should see KDirWatch saying
"hey there's a new file". If you don't see that, then the bug is definitely in KDirWatch
 - or in the way it's being used, maybe.

> kio (KDirWatch): KDirWatch-1 stopped scanning
> /home/kf/.kde/share/apps/ScanImages/OCR (now  0 watchers)
> kio (KDirWatch): KDirWatch-1 restarted scanning
> /home/kf/.kde/share/apps/ScanImages/OCR (now 1 watchers)

Any idea what's the reason for this? Could it be that the new file isn't noticed
because of this? (either because it happens between those two things,
or because the "stopped scanning" drops all pending events).

(Please understand that I'm more familiar with KDirLister and KIO than
with KDirWatch itself).

> > KDirWatch's debug output will tell you which method you're using (Stat, FAM or DNOTIFY).
> > Which one is it?
> [..]
> kio (KDirWatch): Can't use FAM (fam daemon not running?)
> kio (KDirWatch): Available methods: Stat

Do you have 'fam' configured in inetd.conf (or xinetd.d/fam) ?
Do you have portmap running? (I found out that it was necessary)
I know, this won't help users that don't have FAM, but my interest is in making sure
that all systems where FAM should work, are actually configured to make it work
(to find out what to tell users and distributors, so that it works for most people).

> > [One change I'm aware of, is that CopyJob doesn't emit FilesAdded/FilesRemoved
> > anymore when simply renaming.... but that's not your case here (you are simply
> > renaming, but not using CopyJob.  FileCopyJob is the low-level one that only copies
> > one file, and doesn't emit anything.).]
> >
> > In any case, I'd recommend that you emit FilesAdded (see job.cpp for examples),
> > so that you make sure the directory listing gets updated.
> > Relying on KDirWatch is... well, a good way of finding out its bugs ;)
> Yes ;-) but it is not too easy to escape from it as long as you do not want
> to implement a lot of its functionality again just to control it ;-)
Hmm. But we all know that KDirWatch isn't 100% reliable - the well known unfixable
case is updating an existing file, in a directory watched with the Stat method.

- -- 
David FAURE, david at, faure at
Contributing to:,
Get the latest KOffice -
Version: GnuPG v1.0.7 (GNU/Linux)


More information about the kde-core-devel mailing list