Bug 106394 - Konqueror - changes to file must be manually refreshed
Summary: Konqueror - changes to file must be manually refreshed
Status: RESOLVED FIXED
Alias: None
Product: konqueror
Classification: Applications
Component: general (show other bugs)
Version: 3.4
Platform: Debian testing Linux
: NOR normal
Target Milestone: ---
Assignee: Dirk Mueller
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-05-27 21:05 UTC by Simon St James
Modified: 2009-02-18 22:43 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Simon St James 2005-05-27 21:05:44 UTC
Version:           3.4 (using KDE KDE 3.4.0)
Installed from:    Debian testing/unstable Packages
OS:                Linux

I'm seeing this in konqueror 3.4; famd is running, the HAVE_FAM flag is set, but *no* changes to files (except for deletion/ creation) are echoed in Konqueror, opened at the folder containing the file, until refresh is pressed.

I downloaded the KDE 3.4 source and explored; it seems that in kdirwatch.cpp the famd change notification is received, but is never properly propagated; it "fizzles out" at scanEntry.  

I made a (probably hugely ill-informed!) addition of two lines to scanEntry, but I have no idea what knock-on effects it might have as I hadn't even looked at the KDE sources until yesterday ;)

For interested developers, the change was the addition of

if (e->isDir)
   return Changed;

immediately after the lines

  if (e->m_mode == FAMMode) {
    // we know nothing has changed, no need to stat
    if(!e->dirty) return NoChange;
    e->dirty = false;
  }

in method scanEntry in kdirwatch.cpp.  As I said, I really don't know what I'm doing, so if there is a better way of "fixing" this, let me know :)

I'm still not fully sure if this is a bug or a feature or simply a misconfiguration on my part; I seem to recall that this feature was functional in KDE 3.2.3, but I've not heard anyone else compain about it in KDE 3.4.


Steps to reproduce:

Ensure famd (or gamin) is running, and that KDE has been compiled with fam support.  Open a konqueror URL at a local directory to which you have write access, and which contains some dummy file you don't mind altering randomly :) Then in a separate konsole instance, cd to that directory and "touch" the file, or echo some-random-string >> into it.  Observe that in the Konqueror window, the file attributes that should have changed (at least the modification time, but also size if you concatenated stuff onto it) have not changed, and will not change until the folder is manually refreshed.  The desired behaviour is that the attributes in the Konqueror pane should be updated after a short pause, with no manual refresh required. 

Note that this same bug occurs in both gentoo and Kubuntu, so I suspect that it is common to KDE 3.4.  The "fix" above appears to be stable, and works with both famd and gamin.  Also, I posted this in another bug report, but that was for an earlier version of KDE and still marked "unconfirmed".

Thanks for your time; if any developers could at least confirm that this is a bug, that would be great, as I have heard no one else complain about it and want to make sure I've not gone nuts :)
Comment 1 John E 2005-07-15 23:52:04 UTC
I have the same problem, plus the desktop does not refresh, even when clicking on "refresh the desktop", i have to create an empty folder to refresh it.

It's pretty fustrating.

I am also using kubuntu with KDE 3.4.1.

I also had this problem with Centos 4.0, and i believe it was KDE 3.3 but i am not sure.
Comment 2 Punit Agrawal 2005-09-07 02:26:07 UTC
I am facing the same problem on Gentoo. KDE 3.4.2.

If I save/copy/move a file to Desktop folder the desktop doesn't automatically get refreshed. Though the files are visible in shell. And in konqueror too.

The terminal I am using is a diskless client with my home directory being mounted using nfs. Could this be the reason why the automatic refresh doesn't occur?
Comment 3 Dirk Mueller 2006-03-01 16:05:12 UTC
will take a look
Comment 4 Pierre Pardot 2006-05-11 15:22:43 UTC
I have also experienced that problem. i think should be solved for next release.
Comment 5 Donn Ingle 2006-08-16 15:10:07 UTC
Kubuntu 6.06 KDE 3.5.2
Same problem here - but not from word go, it came-on gradually in Konqueror and on desktop. 
If I create a new file directly via context menu on Desktop then desktop redraws all icons.

I am now forced to refresh all Konqueror screens to see new additions.

I am pre-loading Konqueror - this is new, so perhaps it's involved in the problem.
Comment 6 Simon St James 2007-01-06 13:10:36 UTC
Just FYI (it's Konqueror Bug Triage day!) - this bug is still present for me in KDE 3.5.5 and the "patch" still appears to work (although I would advise against its inclusion).  The bug is also present in KDE4 SVN.
Comment 7 Pierre Pardot 2007-01-07 18:59:01 UTC
SS:

Do you mean that the patch still works or that the bug still is present? Well we all supposse the second one.
Comment 8 Simon St James 2007-01-07 22:24:53 UTC
Pierre:Both!

The bug is still present in stock 3.5.5, but the applying the "patch" "fixes" it.

I have not attempted to apply the patch to KDE4 svn.
Comment 9 Gregory David Bowden 2007-09-18 11:17:04 UTC
I can also confirm this bug with KDE 3.5.7 logging out and in again seems to fix this problem for me.
Comment 10 Antonio 2008-05-15 15:53:16 UTC
The bug is still present in KDE 3.5.9.

I am using Debian testing and Debian unstable. This bug is really frustrating since it appears to be alive since years now...

Comment 11 Ruszkai Ákos 2008-06-06 15:04:34 UTC
I've got a partial solution: remove fam .
I've encountered the very same bug on my debian sid box. I've removed fam, konqueror now auto-refreshes.

Comment 12 Cervesato Andrea 2008-08-26 15:39:14 UTC
This bug is still present on Archlinux 2008.06 with KDEmod 3.5.9
Comment 13 Cervesato Andrea 2008-10-05 14:26:01 UTC
This bug is still present on Archlinux 2008.06 with KDEmod 3.5.10
Comment 14 Kuznetsov Vyacheslav 2008-12-15 14:51:42 UTC
This bug is still present on FreeBSD 6.3-RELEASE. KDEmod 3.5.10.
Comment 15 David Faure 2009-02-18 22:15:56 UTC
This works in KDE-4.2 (which uses inotify by default), doesn't it?
Comment 16 Simon St James 2009-02-18 22:43:12 UTC
This is indeed fixed for inotify in KDE4.2.