problem with KIO::NetAccess and KDirLister/KFileTreeView

David Faure david at mandrakesoft.com
Mon Oct 7 16:48:32 BST 2002


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Monday 07 October 2002 16:10, Klaas Freitag wrote:
> In KDE 3.0.x that works in that way that the new file is reported by
> KDirLister and the file appears in the KFileTreeView and the deleted file
> is removed from the tree also by a signal of KDirLister.
> In KDE 3.1 (head from today) it is not working. The new file does not appear
> as long as the del-function is called. It removes the old line and no new file
> is reported. If the del-line is removed from the code above, the new file is
> reported correctly, but of course the old one remains.

Hmm, NetAccess::copy calls KIO::file_copy, which doesn't emit FilesAdded....
So I guess in worked in 3.0.x simply due to KDirWatch noticing the new file?

If that's the case, then I'd guess KDirWatch got broken. Try "touch newfile" from
a terminal to see if it notices it.
KDirWatch's debug output will tell you which method you're using (Stat, FAM or DNOTIFY).
Which one is it?

[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 ;)

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

iD8DBQE9oazQ72KcVAmwbhARAhocAJ44ABVRm92fxQzIjWnnhpvtvXb4RwCgsETx
6x5AgJDAW0+qIsO5+4iJj5s=
=i+nN
-----END PGP SIGNATURE-----





More information about the kde-core-devel mailing list