Bug 456198 - Targets of relative symbolic links are resolved incorrectly in the status bar
Summary: Targets of relative symbolic links are resolved incorrectly in the status bar
Status: REOPENED
Alias: None
Product: frameworks-kio
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: git master
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: KIO Bugs
URL:
Keywords:
: 461672 464326 465879 (view as bug list)
Depends on:
Blocks:
 
Reported: 2022-07-01 09:42 UTC by Paul Worrall
Modified: 2024-03-29 08:35 UTC (History)
10 users (show)

See Also:
Latest Commit:
Version Fixed In: 23.08


Attachments
A screenshot showing status bar v properties (380.15 KB, image/png)
2023-02-17 23:17 UTC, Mike Booth
Details
Shows a folder as being symlinked to itself (102.44 KB, image/png)
2024-01-19 11:15 UTC, Alan Prescott
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Paul Worrall 2022-07-01 09:42:45 UTC
STEPS TO REPRODUCE
1. Navigate in Dolphin to /var/spool
2. Hover over or select the item called "mail" (this is actually a symbolic link to "../mail")

OBSERVED RESULT
Status bar says it's a link to "file:///var/spool/mail" (i.e. a link to itself!)

EXPECTED RESULT
Status bar says it's a link to "file:///var/mail

SOFTWARE/OS VERSIONS
Operating System: KDE neon 5.25
KDE Plasma Version: 5.25.2
KDE Frameworks Version: 5.95.0
Qt Version: 5.15.5
Kernel Version: 5.13.0-51-generic (64-bit)
Graphics Platform: X11
Processors: 2 × AMD A6-6400K APU with Radeon(tm) HD Graphics
Memory: 7.7 GiB of RAM
Graphics Processor: AMD CEDAR
Manufacturer: NOVATECH LTD
Product Name: BB-64004H
System Version: V1.0
Comment 1 Paul Worrall 2022-08-21 08:11:09 UTC
Probably another manifestation of the same bug:  When I right-click on a relative symbolic link and choose "Show Target", it still shows the link.

Note: Symbolic links with absolute path are resolved correctly.
Comment 2 Paul Worrall 2023-02-17 09:45:15 UTC
*** Bug 465879 has been marked as a duplicate of this bug. ***
Comment 3 Mike Booth 2023-02-17 23:17:51 UTC
Created attachment 156404 [details]
A screenshot showing status bar v properties
Comment 4 Mike Booth 2023-02-21 22:55:58 UTC
If its any help Konqueror exhibits the same problem
Comment 5 Méven Car 2023-03-23 11:34:46 UTC
Issue is in KfileItem::StatusBarText
Comment 6 Bug Janitor Service 2023-03-23 11:38:46 UTC
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/kio/-/merge_requests/1237
Comment 7 Méven 2023-04-20 10:16:27 UTC
Git commit 28f94469ac08e0c3aedf541debbcd97901009ed1 by Méven Car.
Committed on 20/04/2023 at 09:19.
Pushed by meven into branch 'master'.

KFileItem StatusBarText: Better resolve relative symlink path

M  +31   -0    autotests/kfileitemtest.cpp
M  +6    -3    src/core/kfileitem.cpp

https://invent.kde.org/frameworks/kio/commit/28f94469ac08e0c3aedf541debbcd97901009ed1
Comment 8 Jonathan Marten 2023-07-14 14:46:13 UTC
*** Bug 461672 has been marked as a duplicate of this bug. ***
Comment 9 Méven Car 2023-08-22 08:32:24 UTC
*** Bug 464326 has been marked as a duplicate of this bug. ***
Comment 10 Alan Prescott 2024-01-19 11:15:14 UTC
Created attachment 165034 [details]
Shows a folder as being symlinked to itself

The correct symlink target should be "Folder, link to /home/alan/snap/pycharm-community/360"
Comment 11 medin 2024-01-19 22:34:18 UTC
I confirm the same problem on Manjaro/KDE Plasma 5.27.10
Comment 12 Alan Prescott 2024-03-29 08:35:01 UTC
Just checked this out again today on most recent openSUSE Tumbleweed updates with Plasma6/Wayland

It appears that symlinks to absolute paths are reported correctly but symlinks to relative paths are not

Operating System: openSUSE Tumbleweed 20240327
KDE Plasma Version: 6.0.2
KDE Frameworks Version: 6.0.0
Qt Version: 6.6.2
Kernel Version: 6.8.1-1-default (64-bit)
Graphics Platform: Wayland