Bug 311582 - Dolphin & Dir watching (viewing) after renaming
Summary: Dolphin & Dir watching (viewing) after renaming
Status: RESOLVED FIXED
Alias: None
Product: kio
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: 4.9.4
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: David Faure
URL:
Keywords: reproducible
Depends on:
Blocks:
 
Reported: 2012-12-12 17:43 UTC by Johann Bergles
Modified: 2013-01-30 00:05 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In: 4.10


Attachments
KDirLister unit test (2.76 KB, patch)
2013-01-24 22:08 UTC, Frank Reininghaus
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Johann Bergles 2012-12-12 17:43:46 UTC
Dolphin does not refresh directory listing anymore after renaming a directory.

Example Steps :

1.) Create a folder called "testdir"
2.) change into them with dolphin
3.) Create 3 times a new folder with dolphin.
folders will be called "new folder, new folder 1 , new folder 2"
4.) Rename any folder - for example : folder 1 into something else e.g. "renamed"
5.) Open Terminal (or any other software (not dolphin)
6.) In Terminal change into the above "testdir"
7.) create a new folder in terminal with "mkdir new dir"
8.) watch what is happend in dolphin, nothing is updated.
One can create as many folder as one need, nothing will be updated anymore unless one press F5




Reproducible: Always

Actual Results:  
Nothing is updated in dolphin even when you change and go out of the directory and back in.
(Seems a problem with the cache ?)

Expected Results:  
view should be refreshed.
Comment 1 Frank Reininghaus 2012-12-12 21:37:06 UTC
Thanks for the report and for the precise steps, I could reproduce this with an up-to-date 4.9 branch checkout. Following the example of bug 211472, I should probably write a unit test for this one as well and then let David fix it. I'll try to do it when I find some time. But if anyone else wants to try, please go ahead!
Comment 2 Lew 2012-12-13 22:12:11 UTC
Similar behaviour here, only worse; F5 doesn't work as expected.
I'll see if I can send more details later.
Comment 3 comet.friend 2013-01-10 02:00:29 UTC
I have this, too, in KDE 4.8.5 on Slackware64-14.0. It seems to similar to https://bugs.kde.org/show_bug.cgi?id=244163.
Comment 4 Frank Reininghaus 2013-01-23 18:23:26 UTC
I tried to come up with a unit test, but did not succeed so far, my test always passes.

Interesting: the bug does not happen if the folder is renamed from the Terminal panel.

(In reply to comment #2)
> Similar behaviour here, only worse; F5 doesn't work as expected.

This is most likely a different bug.

(In reply to comment #3)
> I have this, too, in KDE 4.8.5 on Slackware64-14.0. It seems to similar to
> https://bugs.kde.org/show_bug.cgi?id=244163.

Does not look similar to me. The present bug is about failing to update the view after a folder is renamed. Bug 244163 is about no updates happening at all (which I cannot reproduce). BTW, note that KDE 4.8.5 is quite old. Usually, reporting bugs is only useful if you use a rather recent version.
Comment 5 Frank Reininghaus 2013-01-24 22:08:29 UTC
Created attachment 76696 [details]
KDirLister unit test

OK, I managed to make the test fail by using KIO::moveAs() to do the renaming (which is just what KonqOperations does). I hope that my test is correct and helps to find the root cause.
Comment 6 David Faure 2013-01-25 14:06:11 UTC
Git commit 74b0d33afefc916de7c5a2129704a9e4cf8a3952 by David Faure.
Committed on 25/01/2013 at 13:20.
Pushed by dfaure into branch 'KDE/4.10'.

Fix dirwatching being stopped when using KIO::moveAs().

CopyJob calls stopDirScan to avoid notification storm (it uses KDirNotify
i.e. DBus to notify of the operation instead), and forgot to call
restartDirScan in the precise case of direct renaming. Moving a '}' fixed it.

With many thanks to Frank Reininghaus for another great unittest!
FIXED-IN: 4.10

M  +6    -5    kio/kio/copyjob.cpp
M  +56   -0    kio/tests/kdirlistertest.cpp
M  +1    -0    kio/tests/kdirlistertest.h

http://commits.kde.org/kdelibs/74b0d33afefc916de7c5a2129704a9e4cf8a3952
Comment 7 comet.friend 2013-01-26 21:16:49 UTC
(In reply to comment #4)
[...]
> (In reply to comment #3)
> > I have this, too, in KDE 4.8.5 on Slackware64-14.0. It seems to similar to
> > https://bugs.kde.org/show_bug.cgi?id=244163.
> 
> Does not look similar to me. The present bug is about failing to update the
> view after a folder is renamed. Bug 244163 is about no updates happening at
> all (which I cannot reproduce). BTW, note that KDE 4.8.5 is quite old.
> Usually, reporting bugs is only useful if you use a rather recent version.

Well, "quite old" is relative. It was quite new, when Slackware-14.0 was released, which was less than four months ago... 

Unfortunately, due to the never-ending deficiencies of Akonadi I refrain from upgrading KDE monthly. Every time I do it costs me more time and effort and nerves than if I would migrate to a completely different (non-KDE) email client.

Although I understand, that developers prefer to work on the most recent version instead of haunting bugs in older releases, I also thought that it might help you to track down, since when the bug existed, and what change might have introduced it.
Comment 8 Frank Reininghaus 2013-01-27 14:08:02 UTC
(In reply to comment #7)
> Unfortunately, due to the never-ending deficiencies of Akonadi I refrain
> from upgrading KDE monthly. Every time I do it costs me more time and effort
> and nerves than if I would migrate to a completely different (non-KDE) email
> client.

I fully understand that, and I also appreciate your willingness to help. But please also understand that reports about bugs in old versions don't help us much if we know that major changes and bug fixes have happened in this area in the meantime.
 
> Although I understand, that developers prefer to work on the most recent
> version instead of haunting bugs in older releases

I wouldn't say that we "prefer" to do that. "Hunting bugs in older releases" just makes no sense if we cannot reproduce the bug in the latest release, and it appears likely that the changes that have happened in the meantime have fixed it.

> I also thought that it
> might help you to track down, since when the bug existed, and what change
> might have introduced it.

This might help indeed if you can say precisely 
a) which was the last working version, 
b) which is the first buggy one,
c) you can provide simple steps to reproduce the problem, and
d) the developer can also reproduce the problem on his/her machine.
Comment 9 comet.friend 2013-01-28 12:48:01 UTC
I know and understand that quite well, of course, and as far as possible I try to include all useful information and nothing else in my bug reports and change requests. I really know how hard it is for you to reproduce and track down bugs in any but the most recent versions --- as I said, I had  a life as software developer myself.

The problem for me as a *user* is, however, that I have no realistic chance to satisfy all your requirements for an optimum bug report. E. g., I just don't know, if a bug has been fixed in the most recent release candidate of the next KDE SC incarnation. For the bug here, it seems, that it has been fixed in an version that hasn't been released, yet. So no chance for me to see, if the fix really solves the problem (but, of course,  I have no reason, not to trust you, saying so!).

For bugs like this one I cannot see it in the changelogs, and, frankly, I don't follow the commits. Here I have to rely on the comments of developers, when they say, a bug has been fixed in a more recent version. And if that's the case, all is good for me. I am not demanding that the bug must be fixed in the version I currently use, when I know that it is probably gone, just as soon as I upgrade KDE (or my system along with it).

What I do, however, is to research the bug database, of course, before I file a new bug. And in this case I found a couple of bugs that seemed similar to what I saw, and theses other bug reports referred to different versions, including quite recent ones. But from the descriptions I was not quite sure, if they were really the same. That was my motivation to add my description, along with steps to reproduce it for the version of KDE I have (currently 4.8.5).

If I knew, I would give you all the requested information, but unfortunately, I don't know a) and b), but I think I gave you c), not sure about d). If I can provide this sort of information, I always do, of course!

Anyhow, the good news is, that the bug is apparently fixed in KDE 4.10, which is soon to be released, I guess. Thanks for making KDE a better desktop with (almost ;) ) every new release!

No need to continue the discussion, as I clearly understand your position, and I think you can understand mine. I'll continue to try my best to support KDE with bug reports and change requests, and wherever possible I'll include the information you request. Just that I cannot promise, that I'll always be able to do so.
Comment 10 Frank Reininghaus 2013-01-29 16:59:49 UTC
Thanks for the detailed reply! Just let me add that I do realise that it's not easy to say from a user's point of view if a bug report for an 'old' version will be useful. If you're in doubt, just add a bug report/comment and let us handle the rest. There are certainly some bugs left in KDE 4.10, maybe even some which are related to updating the view after any changes in the folder, which is a very complex thing.
Comment 11 comet.friend 2013-01-30 00:05:21 UTC
(In reply to comment #10)
> Thanks for the detailed reply! Just let me add that I do realise that it's
> not easy to say from a user's point of view if a bug report for an 'old'
> version will be useful. If you're in doubt, just add a bug report/comment
> and let us handle the rest. 

Yep.

> There are certainly some bugs left in KDE 4.10,
> maybe even some which are related to updating the view after any changes in
> the folder, which is a very complex thing.

I can imagine that, given the many abstraction layers in KDE today... Good luck!