problem with KIO::NetAccess and KDirLister/KFileTreeView

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


-----BEGIN PGP SIGNED MESSAGE-----
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 mandrakesoft.com, faure at kde.org
http://people.mandrakesoft.com/~david/
Contributing to: http://www.konqueror.org/, http://www.koffice.org/
Get the latest KOffice - http://download.kde.org/stable/koffice-1.2/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)

iD8DBQE9ou4m72KcVAmwbhARApVPAJ9xLLwEV/4/Uxxc0mtl0JJcp4aWCACgo5E7
3EuesP7Qgfhr+I9+ybtpWHI=
=AjEA
-----END PGP SIGNATURE-----





More information about the kde-core-devel mailing list