Bug 81372 - error following relative symbolic links (symlinks)
Summary: error following relative symbolic links (symlinks)
Status: RESOLVED WORKSFORME
Alias: None
Product: konqueror
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: Konqueror Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-05-11 22:54 UTC by Walter Hofmann
Modified: 2008-05-05 05:20 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Do not resolve symlinks (743 bytes, patch)
2005-09-15 16:58 UTC, Oliver Richers
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Walter Hofmann 2004-05-11 22:54:41 UTC
Version:           3.2.2 (using KDE 3.2.2,  (testing/unstable))
Compiler:          gcc version 3.3.3 (Debian 20040401)
OS:                Linux (i686) release 2.6.6

/home is a link to usr/home
/usr is a link to mnt/data/usr

in /home/wh (=/mnt/data/usr/home/wh) there is a 
relative link pointing to ../../local

I can use this link in the shell without problems 
to access /mnt/data/usr/local

If I open konqueror with file:/home/wh and click
on the link, it complains that /local doesn't exist.
Comment 1 Ben Bucksch 2004-10-07 13:06:53 UTC
arguable. I'd expect the behaviour you see: If I go to /home/wh/ and then to ../../local/ (via symlink or whatever) to end up in /local/
Comment 2 Oliver Richers 2005-09-15 12:13:02 UTC
I don't think, this is arguable. Symlinks should be relative to where they are located. 

Example:
Given a symlink s1 to a real location h, another symlink s2 in h should be relative to h and not to s1!

Revalive symlinks work like this in every application I know, including bash, proftp, samba and even the kde file dialogs. Only konqueror treats them differently.

Regards,
Olli
Comment 3 Thiago Macieira 2005-09-15 12:58:59 UTC
Agreed. It's a bug.

Confirmed on Konqueror 3.5 r449049.
Comment 4 Oliver Richers 2005-09-15 16:12:05 UTC
In kdebase-3.4.2 file libkonq/konq_dirpart.cc line 322:

    if ( fileItem->isLink() && is_local ) // see KFileItem::run
        url = KURL( url, KURL::encode_string( fileItem->linkDest() ) );

What is that good for? When I remove it, konqueror works as expected.
Comment 5 Oliver Richers 2005-09-15 16:58:17 UTC
Created attachment 12578 [details]
Do not resolve symlinks

Here is a simple path that comments out these lines. At least, it works for me.
:-)
Comment 6 A. Spehr 2008-05-05 05:20:13 UTC
Cannot confirm in 4.0 branch r802754 in konq or dolphin.
nareshov verifies