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 118552 - Gnome file picker is displaying one path but thinking another for symbolic links.
Gnome file picker is displaying one path but thinking another for symbolic li...
Status: RESOLVED WONTFIX
Product: gtk+
Classification: Platform
Component: Widget: GtkFileChooser
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2003-07-29 07:34 UTC by Rodd Clarkson
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Rodd Clarkson 2003-07-29 07:34:55 UTC
Steps to reproduce.

1. Open a terminal.  You should be in your home directory.
2. Create a symbolic link to /tmp (`ln -s /tmp`)
3. Open gedit.
4. Click open file icon.
5. In the Open File dialog, double click the tmp listing in Folders.
6. Note that the current folder says '/home/<you>/tmp'
7. Double click the '..' listing in Folders.
8. You're now in the root directory '/'

You get the same behaviour in gimp-1.3 (with a different File Open dialog).
 Also, you get similar behavior in nautilus, except that it shows that you
are in /tmp

I believe that this is an important usability issue.

Firstly, the current folder should always be displayed appropriately
(regardless of what the appropriate folder is), and in the case above this
isn't working.

Regarding what the appropriate folder is, if I as a use move up into a
folder (symlink or not) I expect that going down a folder will put me back
in the folder I came from, and not another part of the file system.

As a user who lives out of the home folder (I'm not, but many are) to
suddenly find yourself in a totally different part of the file system
because you moved into a folder and then back out is totally unexpected. 
Imagine if the sysadmin set up a shared folder on a different part of the
file system and having clicked on the symlinked folder in your home
directory you find yourself in a strange part of the filesystem (unsure
where home is) because exiting the folder doesn't return you form where you
come.  It's all a little to Alice in Wonderland for new users and it really
doesn't offer any benefit (that I'm aware of) for power users.

The current behavior is also inconsistent with behavior in the terminal and
with the current push for HIGGGGGGerfication, I would have thought that
this behavior should be the same.  I'm not advocating doing the wrong thing
because the terminal does, I'm suggesting that the terminal behaves in an
expected manner and so should nautilus and the file picker.

IMHO it's really important that Gnome gets this right.  It's about
consistency.  If I enter a folder and then leave it I expect to be in the
same place I started.
Comment 1 Kjartan Maraas 2003-09-22 10:30:24 UTC
Not sure how this is handled in the new fileselector scheduled for
gtk+ 2.4
Comment 2 Elijah Newren 2004-07-17 22:48:15 UTC
I'm not sure if this bug is still relevant or not, but I'll move to GtkFileSel
component so it'll at least be noticed and either handled or closed as appropriate.
Comment 3 Federico Mena Quintero 2004-08-11 01:15:18 UTC
With the new GtkFileChooser, you don't get a ".." displayed.  Instead, you go to
the parent folder by clicking on the appropriate button in the path bar or by
pressing Alt-Up; both are equivalent.  If you have a ~/tmp symlink pointing to
/tmp, the path bar will show "/home/foo/tmp", so you'll go to /home/foo if you
go up --- this is what you want.

The old GtkFileSelection takes ".." literally, i.e. it is the same as using
chdir(2) with ".." as an argument.  This means that it may not do what you
expect when you use symlinks to directories.

Since the old GtkFileSelection is deprecated, I'll mark this as WONTFIX.  Using
".." is historically broken.  One *could* add a special case for this in
GtkFileSelection, using some sort of stack for repeatedly visiting directories
with symlinks, but plugging that into the completion code may be painful.  Apps
should really be using GtkFileChooser these days.