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 73937 - Nautilus forgets/changes path when entering symbolic link
Nautilus forgets/changes path when entering symbolic link
Status: RESOLVED FIXED
Product: nautilus
Classification: Core
Component: File and Folder Operations
1.1.x
Other Linux
: High minor
: future
Assigned To: Nautilus Maintainers
Nautilus Maintainers
: 115639 128882 (view as bug list)
Depends on: 129859
Blocks: 82198
 
 
Reported: 2002-03-08 04:38 UTC by Rodd Clarkson
Modified: 2004-01-18 12:40 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Deactivates translation of symlinks to their real location! (521 bytes, patch)
2003-01-05 23:20 UTC, Rolf Kulemann
none Details | Review
Sorry, got a broken diff last time. Use this patch. (905 bytes, patch)
2003-01-05 23:26 UTC, Rolf Kulemann
none Details | Review

Description Rodd Clarkson 2002-03-08 04:38:09 UTC
Description of Problem:

My home directory contains a folder called mp3 - /home/rodd/mp3
 
here is "ls -l" of /home/rodd/mp3

lrwxrwxrwx    1 rodd     rfbf           26 Dec  6 10:23 alternative ->
/mnt/whale/mp3/alternative
lrwxrwxrwx    1 rodd     rfbf           19 Dec  6 10:23 folk ->
/mnt/whale/mp3/folk
drwxr-xr-x   28 rodd     rfbf         4096 Mar  4 14:07 jazz
lrwxrwxrwx    1 rodd     rfbf           22 Dec  6 10:23 new_age ->
/mnt/whale/mp3/new_age
lrwxrwxrwx    1 rodd     rfbf           20 Dec  6 10:24 other ->
/mnt/whale/mp3/other
lrwxrwxrwx    1 rodd     rfbf           19 Dec  6 10:24 rock ->
/mnt/whale/mp3/rock
lrwxrwxrwx    1 rodd     rfbf           25 Dec  6 10:24 soundtrack ->
/mnt/whale/mp3/soundtrack

jazz is a real folder inside ~/mp3, all the others are symlinks to
/mnt/whale/mp3 (our mp3 file server).

If I open /home/rodd/mp3 inside nautilus, the 8 folders appear correctly
(the symlinks with arrows).

If I double click on any of the symlinks (folk for example), the location
bar changes to /mnt/whale/mp3/folk.

No clicking on the up arrow, takes me to /mnt/whale/mp3 and jazz no longer
appears.



Expected Behavior:

When I double click a symlink, the location bar should show
/home/rodd/mp3/<symlink>
When I then click on the up arrow, the location should be /home/rodd/mp3.



Actual behavior:

I end up in a totally different path than the one I expect to be in.

Comments:

I would have thought that navigation in nautilus should work the same as in
a terminal.

In a terminal if I am in /home/rodd/mp3 and I cd to folk (a symbolic link
to /mnt/whale/mp3/folk) pwd shows /home/rodd/mp3/folk.  Type cd ..  and
then pwd and you are back at /home/rodd/mp3.

Nautilus should behave the same way.
Comment 1 Darin Adler 2002-03-08 09:18:49 UTC
Wow, this is really funny.

Nautilus used to work the way you are requesting. Then lots of people
reported that it was a bug, and we went to considerable lengths to
make it work the way it does now.

Now you are asking us to change it back.

I think we're going to have to think this through some more to figure
out a way to make everyone happy.
Comment 2 Rodd Clarkson 2002-03-11 22:23:17 UTC
Darin,

This isn't that difficult.  If people want this to work differently to
how I have proposed that is fine, but it should *NOT* be the default
behaviour.

Moving around the file system in Nautilus should work exactly the same
way that it works in the terminal.  Nautilus - at the moment - does not.  

This is inconsistent and therefor confusing.  If I move up a
directory, and then back down, I should end up in the same directory.
 This is how it works at the command line (by default), and nobody is
complaining about this.  Nautilus should work in exactly the same way.

If people want nautilus to be inconsistent with the default behaviour
then this is fine, but make it a preference, and don't make it default.
Comment 3 Rodd Clarkson 2002-03-11 23:08:44 UTC
Darin,

Ooops, chop the first paragraph of what I said above.  It comes over
sounding rude and pompous (which wasn't my intention) and it's not
needed anyway.  Soory if I offended anyone ;-]

Rodd
Comment 4 Dave Bordoley [Not Reading Bug Mail] 2002-05-15 06:53:19 UTC
I have to concur with rod on this one. The current behavior just
totally negates the whole purpose of symlinks in unix. I would hope
that this change would be reverted so that Links(symlinks) behave
correctly in nautilus as they should in unix, instead of simply
placing the windows paradigm of "shortcuts" on unix. The current
behavior of symlinks in nautilus pretty much defeats the purpose of
them. The current behavior pretty could be achieved using .desktop
files. Symlinks however should behave like they do in the terminal...

I really want to bump the severity of this to normal. Louie?
Comment 5 Luis Villa 2002-05-15 20:34:21 UTC
yeah, I guess this really isn't an enhancement. Not sure I can see it
as a huge bug, though, either way.
Comment 6 Rodd Clarkson 2002-05-15 23:42:46 UTC
I've stated this already, but I think it's worth pointing out again.

The current behaviour in nautilus isn't the same as the behavior at
the command line.  This creates a confusing situation.

Further, i would expect that if I go down a branch, I'd head up the
same branch when moving in the opposite direction.

I'll state it outright.  The current path navigation in nautilus is
busted.  It's unintuitive and inconsistent.

Here's an example.

If I have symlinks in my home directory that link to four or five
other directories elsewhere on the disks, this is because I want to
stay in my home directory.  If I wanted to be somewhere else on the
disk, I'd navigate to that point, and start there.  I can see why some
would argue that you can get to the home directory by pushing the back
button, so having the up button move to the actual link directory
might add functionality, but what it actually does is create confusion.

Comment 7 Rolf Kulemann 2003-01-05 23:20:23 UTC
Created attachment 13368 [details] [review]
Deactivates translation of symlinks to their real location!
Comment 8 Rolf Kulemann 2003-01-05 23:26:48 UTC
Created attachment 13369 [details] [review]
Sorry, got a broken diff last time. Use this patch.
Comment 9 Rolf Kulemann 2003-01-06 07:20:08 UTC
Perhaps the method "nautilus_file_get_symbolic_link_target_uri" [1]
from file nautilus-file.c/h should be removed.
It was only used in the method "nautilus_file_get_activation_uri". My
patch deactivates the call to [1] in order to fix this bug/problem.

Have fun.
Comment 10 Alexander Larsson 2003-01-07 15:32:10 UTC
I agree with this change. In CVS soon.
Comment 11 Mark Finlay 2003-01-28 21:47:58 UTC
 2003-01-20  Alexander Larsson  <alexl@redhat.com>
 
         * libnautilus-private/nautilus-file.c:
         Revert the symlink activation change. For later discussion.
Comment 12 John Fleck 2003-04-26 20:28:19 UTC
So is this now fixed?
Comment 13 Alexander Larsson 2003-04-28 09:16:28 UTC
The change was reverted by popular request. We haven't decided on a
final behaviour.
Comment 14 Christopher Alexander North-Keys 2003-09-05 04:20:33 UTC
This version of Nautilus (now 2.2.1 on Redhat 9) still has problems
with symbolic links.

First let me point out that earlier posts make the mistake of using
shell behavior with respect to symlinks as a baseline.  This isn't
helpful, since the shells writers/user have had the same
physical-vs-logical path debate for ages, and the behavior is settable
in bash, for example, as a user preference (set -P option).

Mostly the user preference refers exclusively to the meaning of "..".
Personally I think that both logical and physical should be tracked,
with a choice in apps such as nautilus, but this would just confuse
newbies.  (But I like the idea of two up buttons being available in
such cases)

On the other hand, I am actually having a problem.  What I wish to do
is create a reference on the desktop to a directory in the
filesystem..  Copying them is out of the question.  No mechanism is
available on the root menu - or if Create New Launcher is it, I don't
see how.  So, I used the "ln -s" command to create a symlink in
.gnome-desktop.  This works fine, appearing immediately on the desktop
and being clickable UNLESS the path I link to contains a symlink. If
it does, then -sometimes- clicking on it doesn't work.  Unfortunately
I can't reproduce this reliably, so nevermind.

Puzzled by this, I attempted to browse to /pod/games directly.  Most
of the time this worked, although clicking on "pod" from a view of
root immediately produced /fs/d1/pod in the Location: bar.  But one
time, it got caught in some kind of loop, spawned about 20 additional
views, and then returned control.  Odd.  I can't duplicate this
either, though.

But the difficult with making a symlink from .gnome-desktop to start
with remains, so does anyone think these might be worth adding?:

1) The ability to make a link to a resource on the desktop by dragging
from a nautilus window without it trying to make a copy. Well,
actually dragging would allowing making links between nautilus windows
to, just putting one on the desktop could be done with a action in a
pulldown on the it to link to.
2) A way to create a link on the desktop from the root menu by
entering the path as text would be nice.


Comment 15 rtomayko 2003-11-09 02:43:36 UTC
Chiming in with a +1 to revert back to not jumping all over the place.
This is horribly confusing. 

I would also like to point out that Windows "links"/shortcuts are not
the same thing as *NIX symlinks since this seems to be the argument
for the jumping behavior. Windows shortcuts are the equivelant of
.desktop files (i.e. they are normal files stored with a .lnk
extension that contain info similar to .desktop files). Windows
recently (maybe around win2000) got real symlinks (well.. kinda) for
NTFS. They are called JUNCTIONS and I have never seen a windows app
follow a junction. This would defeat the purpose of having a true
filesystem linking mechanism in the first place.

I would suggest making a distinction between real filesystem links and
shortcuts as they are two separate concepts that require different
behaviors. Shortcuts (or .desktop files) should hop, symlinks should not.
Comment 16 olaf 2003-12-22 14:35:12 UTC
*** Bug 128882 has been marked as a duplicate of this bug. ***
Comment 17 olaf 2003-12-22 14:37:56 UTC
Here is comment from bug 128882. I closed it and marked as duplicate.

If I have symlink to directory, and I enter into this directory through
symlink, and use "Up" button, then I'm not back in the symlink's parent
directory but in parent of real directory.
The "Location" shows the real directory, not the
symlinked one. This also makes confusion. As in my example:
you are in "/home/ala" and go to "sample". After that nautilus shows in
"Location": /home/olaf/test, but the user expects /home/ala/sample.

Below is example:

Directory:
/home/olaf/test

symlink:
/home/ala/sample -> /home/olaf/test

I start in /home
I go to "ala"
I am in /home/ala
I go to sample
And nautilus shows that I am: /home/olaf/test
If I push "Up" button I go to /home/olaf.

I want nautilus to show /home/ala/sample 
and if push "Up" to go to /home/ala

Users get crazy when they see
/mnt/sda5/vol7/... and they expected to be in /home/projects/.....
Comment 18 Paolo Borelli 2003-12-22 16:13:32 UTC
*** Bug 115639 has been marked as a duplicate of this bug. ***
Comment 19 Jürg Billeter 2004-01-17 10:28:54 UTC
2004-01-11  Alexander Larsson <alexl@redhat.com>

  * libnautilus-private/nautilus-file.c
(nautilus_file_get_activation_uri): 
  Don't expand symlinks when following them.

As this has been corrected, can someone please mark this bug as
resolved/fixed?
Comment 20 Kjartan Maraas 2004-01-18 12:40:35 UTC
Closing.