Bug 302037 - Opening a symbolic link folder when the Terminal Panel is open changes the URL to the actual location
Summary: Opening a symbolic link folder when the Terminal Panel is open changes the UR...
Status: RESOLVED FIXED
Alias: None
Product: dolphin
Classification: Applications
Component: panels: terminal (show other bugs)
Version: 2.0.95
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: Dolphin Bug Assignee
URL:
Keywords: reproducible
: 302254 314246 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-06-17 07:09 UTC by Frank Reininghaus
Modified: 2013-05-12 17:24 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In: 4.10.3


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Frank Reininghaus 2012-06-17 07:09:53 UTC
Opening a folder which is a link to another folder may cause another URL change to the actual location of the link if the Terminal Panel is open.

Reproducible: Always

Steps to Reproduce:
1. Create a symbolic link to the home folder in a subfolder of the home directory, e.g.,
 cd && mkdir test-link && ln -s $HOME test-link/link-to-home
2. Make sure that the terminal panel is open, click the folder test-link in Dolphin's view, wait for more than 1 second, then click the symbolic link link-to-home.
3. The URL shown in the URL navigator is first ~/test-link/link-to-home and then quickly changes to ~.




It seems that the Konsole part passes the actual location ~ as the argument of the currentDirectoryChanged(QString) signal, even though the shell prompt and pwd say that the current directory is ~/test-link/link-to-home.

The 1 second delay in step 2 is needed because the Konsole part only queries the current directory once per second, see bug 156732 comment 14.
Comment 1 Maarten De Meyer 2012-06-20 18:52:35 UTC
*** Bug 302254 has been marked as a duplicate of this bug. ***
Comment 2 Jekyll Wu 2012-08-17 05:24:38 UTC
Sorry for the late response. 

Unfortunately, that behavior of konsolepart can't be "fixed" under current implementation. The way konsole/konsolepart getting to know the working directory of the process(shell) in Linux is looking at /proc/<pid>/cwd, which is itself already a symlink pointing to the "actual location". So although the process(shell) may understand symlink and target, konsole only knows the target (actual location).
Comment 3 Frank Reininghaus 2012-08-17 08:00:57 UTC
Thanks for the explanation Jekyll!

In that case, the best way to fix this is probably to check on the Dolphin side if the current URL of the view is a symlink that points to the URL received from the Konsole part, and in that case, ignore the message received from the Konsole part.

I'll add that to my TODO list.
Comment 4 Jeroen van Meeuwen (Kolab Systems) 2012-08-24 16:19:39 UTC
Resetting assignee to default as per bug #305719
Comment 5 Frank Reininghaus 2013-05-02 17:41:19 UTC
Git commit 2e123de94f6d654cbe37e4ac1841422632ca5451 by Frank Reininghaus.
Committed on 02/05/2013 at 19:38.
Pushed by freininghaus into branch 'KDE/4.10'.

Do not change the view URL if it is a symlink to the current directory
FIXED-IN: 4.10.3
REVIEW: 110233

M  +6    -1    dolphin/src/panels/terminal/terminalpanel.cpp

http://commits.kde.org/kde-baseapps/2e123de94f6d654cbe37e4ac1841422632ca5451
Comment 6 Frank Reininghaus 2013-05-12 17:09:51 UTC
*** Bug 314246 has been marked as a duplicate of this bug. ***
Comment 7 Oleh Prypin 2013-05-12 17:24:39 UTC
(In reply to comment #5)

I confirm that this has been fixed in KDE 4.10.3.
Thank you for the much needed fix. This was the most annoying bug in the whole KDE for me.