GNOME Bugzilla – Bug 318094
Nautilus windows should close on unmount
Last modified: 2010-02-22 13:20:42 UTC
Distribution/Version: Ubuntu Breezy Forwarded from http://bugzilla.ubuntu.com/show_bug.cgi?id=17115 http://bugzilla.ubuntu.com/show_bug.cgi?id=17115
(Sorry for forgetting the actual text... OUCH): (This is not a bug, but a wishlist item) When a removable device is unmounted (cdrom, etc.), all nautilus windows displaying it are reset to my home directory, cluttering up my taskbar/desktop after working with several cdroms. I would find it nicer if they would disappear if their root directory was within the unmounted filesystem. Regards Martin emrich
Confirmed with Nautilus 2.12.1 on Ubuntu Breezy.
Works fine with dapper, I'm closing the bug. Feel free to reopen if you still get he issue
This still happens to me on a fully updated Dapper.
I just tried this after a long time on Ubuntu feisty (Gnome 2.17.90): - mounted some remote folder via SSH/gnome-vfs - opened it - unmounted it The Window still snaps back to my home directory. Ciao Martin
Still here with 2.18.1 Ciao Martin
Still here with 2.22.3
The “go to home” policy has been introduced deliberately. Closing a window would lose its entire history, and you may go back to a location that is not on the disk. Especially in the case of remote mounts, where re-trying to open a remote location will lead to a re-mount attempt. The unmount might have happened accidentally, because the cable was pulled out or something. On the other hand, I understand that the basic problem put disc into drive with automount enabled => window pops up eject disc => window goes to home is very unintuitive. What about the following agreement: When ejecting a medium, if a window was opened due to automount, only displayed locations on the mounted disk, and it is not the last displayed window, then close it. Otherwise go to home.
*** Bug 466719 has been marked as a duplicate of this bug. ***
This has always been a pet peeve of mine with Nautilus. It seems that the biggest opposition to this bug is that history is lost if you close the window. I have a simple proposition: If there is no history for that window/tab, close it. If there is, go back in history until you reach a point that is not under the removed media's root. If no point in history is not under the removed media's root, then the window/tab now has no use, and should be removed. It seems that GVFS already behaves similarly to this. The only difference is that if there is history in the window of the removed virtual volume which has just been unmounted, it just redirects to the User's home directory. I think that behavior would be acceptable for removing physical media too. I'm a bit confused as to why the behaviors differ.
Created attachment 153969 [details] [review] Fixes existing check for if window should be closed. This patch checks if a window is displaying or has displayed (in history) the root folder of the mount using g_file_equal in addition to the existing g_file_has_prefix checks. Note that this change along with the *existing* code only closes windows who have navigated solely around the mount. If you have navigated anywhere else in the window it won't be closed.
pushed.