Bug 425957 - Search by filename returns no results inside symlinked directory
Summary: Search by filename returns no results inside symlinked directory
Status: REPORTED
Alias: None
Product: dolphin
Classification: Applications
Component: search (show other bugs)
Version: 20.08.0
Platform: Arch Linux Linux
: NOR minor
Target Milestone: ---
Assignee: Dolphin Bug Assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-08-29 19:51 UTC by nicholas.churchill123
Modified: 2022-11-20 10:40 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
a possible Dolphin settings navigation option for symlinked folders (177.32 KB, image/png)
2022-11-20 10:40 UTC, Sadi
Details

Note You need to log in before you can comment on or make changes to this bug.
Description nicholas.churchill123 2020-08-29 19:51:17 UTC
SUMMARY
Searching by filename returns no results when initiated inside a symlinked directory but works properly when navigated to the original directory.

STEPS TO REPRODUCE
1. Mount a partition to "/media" and navigate inside it
2. Create a folder like "/media/testing"
3. Navigate inside "/media/testing"
4. Create a file named "test-document.txt"
5. Navigate back to root partition "/home/$user"
6. Create a symlink to the testing folder "ln -s /media/testing testing-sym"
7. Navigate inside the "/home/$user/testing-sym" folder in Dolphin
8. Search by filename for "test-document", no results will appear
9. Navigate to "/media/testing" in Dolphin
10. Search for "test-document" and result will appear

OBSERVED RESULT
Search function will return no results when navigated inside the symlinked folder "/home/$user/testing-sym" but will return results when navigated directly to the linked folder "/media/testing"

EXPECTED RESULT
Search should return the test document in search results when Dolphin is navigated inside "/home/$user/testing-sym"

SOFTWARE/OS VERSIONS

Operation System: Arch Linux
KDE Plasma Version: 5.19.4
KDE Frameworks Version: 5.73.0
Qt Version: 5.15.0
Comment 1 Berengal 2022-04-19 22:56:01 UTC
I can confirm this, but also the bug is still there even on the same partition. Searches from symlinks doesn't find any results. I would expect the search to return the same results as if it was searching from the link target.
Comment 2 HeathenHacks 2022-07-08 08:04:02 UTC
Can confirm on Plasma 5.25.2
OS: ArcoLinux
Kernel: 5.18.9-arch-1
KDE Frameworks Version: 5.95.0
Qt Version: 5.15.5
Comment 3 Sadi 2022-11-18 12:03:32 UTC
Apparently, this is because files are being indexed according to their real location only, so no duplicate entries are being created to include the same files also with their symlinked path.

I guess a solution for this longstanding problem could be; letting Dolphin open a symlinked directory using its real path instead of the current "virtual" path, which creates this frustrating search problem.
Comment 4 Sadi 2022-11-20 10:40:58 UTC
Created attachment 153899 [details]
a possible Dolphin settings navigation option for symlinked folders

It seems we need an additional option in Dolphin Settings > Configure Dolphin > Navigation, like this.