problem with KIO::NetAccess and KDirLister/KFileTreeView

David Faure david at
Tue Oct 8 15:39:33 BST 2002

Hash: SHA1

On Tuesday 08 October 2002 16:33, Josef Weidendorfer wrote:
> Followup:
> KIO::DeleteJob does it right: stops dir watching - deletes files - restarts 
> dir watching - and tells the world about deleted files (With KDirNotify).

But _only_ about those.
The problem is that the "file added" notification happens during the time
when the watching is stopped, no?

Then the fix for DeleteJob is quite easy. We simply need to replace the 
FilesRemoved call(s) with FilesAdded( dir ) calls - which should have been
called UpdateDir(), that's what it does in fact.

> The last action should trigger a refresh in KFileTreeView.
> Don't know why this doesn't happen.

In Konq it would only remove those 'deleted files', not trigger a full refresh.

> And the API of KDirWatch is fine as long as we start the refresh after
> restoring the watch ;-)

Yes, I wanted to say that ;)

> Can the above race condition happen with KDirLister in general?
> I.e. does it read in the directory content before setting a watch?

No. openURL sets a watch first thing.

- -- 
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