KDirWatch problem/bug
Jeroen Wijnhout
Jeroen.Wijnhout at kdemail.net
Sat Feb 14 13:03:47 GMT 2004
On Friday 13 February 2004 22:37, Josef Weidendorfer wrote:
> Am Friday 13 February 2004 17:23 schrieb Jeroen Wijnhout:
> > e->m_clients.count() == 1, e->m_entries.count() == 0
> > and the function returns, while that shouldn't happen (I've checked that
>
> Hmm...
> If e->m_clients.count() == 1 in that line, the file was watched twice
> before, or the wrong KDirWatch object has requested file removal, i.e. not
> the one which added it for watching.
> So the code at this point seems to be correct (Note that m_entries is
> always empty for files; for directories, it contains entries of files/dirs
> being watched in this directory).
>
> The question is, why it is being watched twice.
> It would be interesting to see which client is still watching the file by
> calling KDirWatch::statistics(). Can you try to reproduce the bug and give
> the output of statistics() ?
I will try. This is what I did already:
Before and after called KDirWatch::removeFile() I called
KDirWatch::contains(), if everything is ok we have:
KDirWatch::contains(file) == true
KDirWatch::removeFile(file)
KDirWatch::contains(file) == false
but sometimes (when e->m_clients.count() == 1) we have:
KDirWatch::contains(file) == true
KDirWatch::removeFile(file)
KDirWatch::contains(file) == true
Remember, Kile was the _only_ application that watched this file. So indeed it
seems KDirWatch thinks another client is watching this file and therefore
refuses to remove it.
To be continued...
best,
Jeroen
--
Kile - an Integrated LaTeX Environment for KDE
http://kile.sourceforge.net
More information about the kde-core-devel
mailing list