After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 87701 - files added in background cause re-sort/re-flow and rename to lose focus
files added in background cause re-sort/re-flow and rename to lose focus
Status: RESOLVED FIXED
Product: nautilus
Classification: Core
Component: Views: List View
2.8.x
Other other
: High major
: ---
Assigned To: Nautilus Maintainers
Nautilus Maintainers
: 110294 110295 111134 111378 126673 127719 128242 129795 141524 146226 156567 158366 159394 160996 162207 163042 166773 168011 (view as bug list)
Depends on:
Blocks: 94250
 
 
Reported: 2002-07-09 00:22 UTC by lukeh
Modified: 2006-11-26 17:07 UTC
See Also:
GNOME target: ---
GNOME version: 2.9/2.10



Description lukeh 2002-07-09 00:22:05 UTC
When renaming a file, if the directory contents change (e.g. you're
gzipping a big file in the background), 'fam' notifies Nautilus and the
view is updated.  The focus to the rename field is lost, however.

To duplicate: gzip a large file with -9 (so it takes longer); try several
times to rename a file in the same directory; each time it will fail.
Comment 1 Mark Finlay 2003-02-03 22:37:11 UTC
Can confirm with 2.2 but only in the list view
Comment 2 Dave Camp 2003-04-08 21:26:11 UTC
*** Bug 110294 has been marked as a duplicate of this bug. ***
Comment 3 mwehner 2003-10-12 12:53:54 UTC
*** Bug 111134 has been marked as a duplicate of this bug. ***
Comment 4 Sebastien Bacher 2003-11-19 18:37:40 UTC
*** Bug 111378 has been marked as a duplicate of this bug. ***
Comment 5 Sebastien Bacher 2003-11-20 14:22:01 UTC
*** Bug 126673 has been marked as a duplicate of this bug. ***
Comment 6 Sebastien Bacher 2003-11-24 14:49:42 UTC
*** Bug 127719 has been marked as a duplicate of this bug. ***
Comment 7 Martin Wehner 2003-12-01 18:32:06 UTC
*** Bug 128242 has been marked as a duplicate of this bug. ***
Comment 8 athproject 2003-12-09 09:31:31 UTC
I can trigger it even on Nautilus 2.4.1
It seems to happen more frequently using "View as List", but even
"View as Icons" isn't immune.
It sometimes happens even if the directory contents don't change (but
only if FAM is running).
Comment 9 Nelson Benitez 2004-01-07 18:21:46 UTC
I found it this way: downloading a file with wget and trying to rename
a file in that folder with "View As List", it refreshes so quickly so
it's impossible to rename it. In "View As Icon" has no problem, the
size of the downloading file gets updated while I rename a file.
Small Suggest: Maybe implement the "Rename" as a pop-up window in the
"View as List" would be an easy workaround (not the best fix)
Comment 10 Marius Gedminas 2004-03-09 20:28:44 UTC
Today I encountered the same bug while trying to rename a file in a
network share with a bunch of mpegs.  Nautilus generated a thumbnail
in about 2-3 seconds, and every time the rename box would lose focus.

This was in the icon view so using a popup for the list view would not
help.  (BTW the Component field above should probably be changed to
View as (Icons or List) -- I cannot do that.)

I suppose a simple fix would be to disable view updates while the
rename box is active.
Comment 11 Jonathan Nicol 2004-04-04 11:53:54 UTC
This is still happening in 2.6.0. Working in a directory with a file currently
being downloaded, rename loses focus every time fam updates the file list (1-2
seconds). Stopping fam ceases this behavior from Nautilus. I'm using 2.6.0, in
browser mode, with list view. I updated to 2.6 hoping this would be fixed. Drat.
Comment 12 Dennis Möhlmann 2004-04-23 10:24:42 UTC
The same thing happens if you rename multiple files.

- rename a file
- quickly select another one for rename in the same folder
- edit field disappears one or two seconds later because fam notification of
previous rename arrives

I just deleted a file because of this. I was about to remove a letter from the
name (DEL-key) when the edit field disappeared. I'm glad I could restore it from
.Trash .

This bug should receive increased _priority_ because of possible dataloss.
Comment 13 Martin Wehner 2004-05-17 00:04:14 UTC
*** Bug 141524 has been marked as a duplicate of this bug. ***
Comment 14 Martin Wehner 2004-05-17 00:06:01 UTC
Still valid for 2.6.x series; upgrading fields.
Comment 15 D.S. (Spider) Ljungmark 2004-07-15 20:18:16 UTC
This is still valid in 2.6.3


open the camera on  /mnt
drag files to pictures/somedate
try to rename pictures/NewFolder to pictures/otherdate....  
its impossible... :-/
Comment 16 Matthew Gatto 2004-07-24 17:14:21 UTC
*** Bug 110295 has been marked as a duplicate of this bug. ***
Comment 17 Matthew Gatto 2004-07-24 17:25:41 UTC
Changing Summary + Severity -> Major, since this can result in files being
permanently deleted just because a new file is added to the directory in the
background.

Comment from bug 110295 which makes sense, and is what Windows does: "'new'
files don't need to go in sorted asap, just append them at the end for the time
being - that is, until the user cares and clicks Refresh or Sort".
Comment 18 Matthew Gatto 2004-10-29 00:52:13 UTC
*** Bug 156567 has been marked as a duplicate of this bug. ***
Comment 19 Matthew Gatto 2004-11-04 05:16:03 UTC
*** Bug 129795 has been marked as a duplicate of this bug. ***
Comment 20 Sebastien Bacher 2004-12-13 19:09:41 UTC
*** Bug 160996 has been marked as a duplicate of this bug. ***
Comment 21 Olav Vitters 2004-12-25 11:25:36 UTC
*** Bug 162207 has been marked as a duplicate of this bug. ***
Comment 22 Sebastien Bacher 2005-01-05 19:56:51 UTC
*** Bug 163042 has been marked as a duplicate of this bug. ***
Comment 23 Sebastien Bacher 2005-01-05 19:57:18 UTC
*** Bug 158366 has been marked as a duplicate of this bug. ***
Comment 24 Reinout van Schouwen 2005-01-05 20:03:45 UTC
Removing sisob from the cc list, as unfortunately he isn't with us any more.
Comment 25 Martin Wehner 2005-02-12 07:38:37 UTC
*** Bug 166773 has been marked as a duplicate of this bug. ***
Comment 26 Martin Wehner 2005-02-12 09:04:26 UTC
*** Bug 146226 has been marked as a duplicate of this bug. ***
Comment 27 Martin Wehner 2005-02-12 13:40:38 UTC
*** Bug 159394 has been marked as a duplicate of this bug. ***
Comment 28 Alexander “weej” Jones 2005-02-12 14:10:36 UTC
Maybe files that are freshly added are appended to the end of the list with a
seperater between the sorted list and the new files?

This would be like Windows' behaviour but better if there was a clear seperater
between them. I'd vouch for this as default behaviour, with auto sorting being
available as an option.

Another suggestion is if maybe the currently selected file remains in the same
position in the view port while other files are added above or below depending
on the sorting scheme. This would prevent a jumpy selection.

Alex Jones
Comment 29 Michaël Arnauts 2005-02-12 14:22:42 UTC
I don't know... The best solution would be to resort all the items, but the
previously selected item should still be selected (or in edit-filename-mode if
it was in that mode (F2))
Comment 30 Alexander “weej” Jones 2005-02-12 14:36:09 UTC
The problem I have with that though is if I've got something selected or I'm
ready to drag something and all of a sudden my view is updated with new files,
the selection jumps around and I have to go find it again.
Comment 31 Michaël Arnauts 2005-02-12 14:42:16 UTC
Hmmm... You have a point there... In that case, your idea isn't that bad...
Comment 32 Martin Wehner 2005-02-21 20:16:56 UTC
*** Bug 168011 has been marked as a duplicate of this bug. ***
Comment 33 Alexander “weej” Jones 2005-02-21 21:12:07 UTC
My idea isn't that "bad"!? :P

Any word from developers as to when this is going to be addressed? Doesn't seem
that big of a deal really but this bug is more than two and a half years old! I
wish I could code :(
Comment 34 Michaël Arnauts 2005-02-21 22:02:20 UTC
I think the biggest problem with this bug is that by adding items at the end, it
is inconsistent with the automatic sorting you have done before... This could be
solved by turning the sorting to manual, but when doing so, the user will wonder
why the view has turned into manual mode...

Still, i think your idea is the best way in solving this...
Comment 35 Rod Butcher 2005-03-16 12:30:23 UTC
My 0.05c... I'm quite happy to have incomplete files appear at the end of the
listing.. by putting them there the sort sequence of existing files remains
unaffected. After all these incomplete files don't really even exist yet. In
fact if these files didn't even appear in the main window until they were
complete it wouldn't bother me.
While a large file is being say downloaded into a directory from the Internet,
you don't want to do anything with it, the focus of attention is the other files
in the directory we're working on. They need to be accessible. So, have the
incoming files at the end of the list with a special icon indicating Locked or
Under Creation or whatever.
Comment 36 Alexander “weej” Jones 2005-03-16 20:37:05 UTC
I'm sorry I have to disagree. I often open long mp3 files as they are
downloading. Beep Media Player handles this fine and I can start listening
straight away even though the file is incomplete.
Comment 37 J.B. Nicholson 2005-04-01 01:53:25 UTC
How about temporarily disabling auto-update for the window in which the rename
is going on, then re-enabling auto-update for that window when the rename
operation is over (user has hit enter to "set" the new name or a cancel key to
return the name to its previous name)?

Other windows showing the same directory could be auto-updating the whole time
because the user's attention is focused (no pun intended) on the rename operation.
Comment 38 Lloyd 2005-04-03 05:14:49 UTC
I agree with J.B. Nicholson-Owens suggestion. Stop refreshing while files are
being renamed. I'm going to look into fixing this myself - no promises though!
This is the most annoying problem I face on my computer everyday and IMHO should
be a showstopper bug. This is major! Hopefully I'll be able to fix it (never
looked at Nautilus' code before).
Comment 39 Michaël Arnauts 2005-04-03 07:46:55 UTC
J.B. Nicholson-Owens's suggestions is a very good way to solve the losing focus
problem, but what when you were about to drag a file like said in #30? That is
still unsolved, and I guess it isn't easy to find a good clean solution for that...
Comment 40 Alexander “weej” Jones 2005-04-03 18:58:36 UTC
Please, consider my idea in #28! Good, clean solution!

A "fresh files" section. Hmmm let me see if I can knock something up in glade or
GIMP.
Comment 41 Marius Andreiana 2005-04-03 21:09:47 UTC
The problem in #30 is a separate bug. Solution: Before refresh, nautilus checks
if files were selected and remember them. After refresh, selects them again.

The simple and efficient solution for this bug is to stop refresh for current
folder when renaming a file, as Owens said.

I don't like solution in #28, it looks like an ugly hack which would complicate
the code (complicate = maintenance, speed, memory)
Comment 42 Pete Black 2005-04-03 21:19:11 UTC
If nautilus refreshes while rename is in progress, it should pop up a dialog to
support the rename operation - e.g. let nautilus refresh and reflow the icon
view, but ensure that the user's immediate rename operation can continue in the
foreground.

Adding an icon in the dialog that will highlight the just-renamed file would be
nice too - this might be a slightly inconsistent approach, but i'd rather have
something that works than a half-assed buggy filemanager.
Comment 43 Martin Wehner 2005-05-03 20:26:00 UTC
I committed a workaround on HEAD which freezes updates to the list view while
the user is renaming. To keep the updates from stacking up infinitely (and
eating up all your memory), after a certain amount of changes the view is marked
for reload after the rename operation is complete.

It's a bit lame but in practice noone will pay attention to changes in a
directory while renaming a file anyway (especially since often the changes are
not even user-visible). The only workable alternative mentioned here would be
poping up a dialog when renaming. But when the list view does that, the icon
view should do it too and inline renaming is too sexy to abandon over this.
Adding the files at the end or something doesn't help, as every update to the
underlying GtkTreeView ends renaming, not just updates to the current file.

If no problems pop up with this patch, it should be eventually committed to the
stable branch too - as this bug is most annoying. If it's still a problem with
the icon view (I never noticed that), it shouldn't be a problem to handle it the
same way.
Comment 44 Rod Butcher 2005-05-05 11:29:28 UTC
I can confirm that file operations like rename etc. now work OK while files are
being loaded into a directory. I tested nautilus cvs Head on a Mandrake 10 box
with Gnome 2.11, while cvs was importing files. No problems.
Woo-hoo !!
Comment 45 Christian Neumair 2005-05-23 10:46:59 UTC
> I committed a workaround on HEAD which freezes updates to the list view while
the user is renaming

Martin: Does that mean that the src/file-manager/fm-directory-view.c:rename_file
hack can vanish?
Comment 46 mark bokil 2005-05-23 14:39:40 UTC
I noticed besides the renaming issue that right-clicking on a file may not work
if the current nautilus view has directory activity such as adding a significant
amount of new files. Possibly any sort of right-click event on a file in
Nautilus should freeze upate until the popup is dimissed by hitting the close
button. my 2 cents.
Comment 47 Martin Wehner 2005-05-27 18:50:08 UTC
I committed the patch to the stable branch too, so it'll get into 2.10.2.
Christian: No not yet, the change event that takes the focus from the new folder
is delivered in the same batch as the creation event. So the freezing needs to
stop event dispatching even when already underway. I actually hacked it up, but
I feel like I should give it a bit more testing.
Comment 48 Christian Neumair 2005-08-26 21:47:17 UTC
No new bug reports on this issue. Martin's fix obviously worked. Closing.
Comment 49 Nelson Benitez 2006-11-26 17:07:51 UTC
As comment 8 and comment 10 said, there is still part of this bug in icon view, in concrete that icon view looses rename focus when there are file additions/removals in the background. For more details see bug 318373.