Bug 462881

Summary: trying to search in folders with "#" results in incorrect file path
Product: [Applications] dolphin Reporter: dagdnoob
Component: searchAssignee: Dolphin Bug Assignee <dolphin-bugs-null>
Status: CONFIRMED ---    
Severity: normal CC: kfm-devel, s_chriscollins, tagwerk19
Priority: NOR    
Version: 22.08.3   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description dagdnoob 2022-12-11 05:14:26 UTC
SUMMARY
***
NOTE: If you are reporting a crash, please try to attach a backtrace with debug symbols.
See https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports
***


STEPS TO REPRODUCE
1. create folder with "#" character
2. try to search in said folder

OBSERVED RESULT
file path text after "#" is removed

EXPECTED RESULT
search completes normally

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: Arch Linux 6.0.11-zen1-1-zen
(available in About System)
KDE Plasma Version: 5.26.4
KDE Frameworks Version: 5.100.0
Qt Version: 5.15.7

ADDITIONAL INFORMATION
Comment 1 tagwerk19 2022-12-11 07:59:17 UTC
(In reply to dagdnoob from comment #0)
> STEPS TO REPRODUCE
> 1. create folder with "#" character
> 2. try to search in said folder
What I tried...

Disable Baloo

Create a folder with a testfile

    mkdir 'folder # one'
    cd 'folder # one'
    echo 'Hello Penguin' > testfile.txt

Open Dolphin and go to the folder:

    Dolphin will show the testfile.txt
    Press Ctrl-F to get the search box, you will see the "From Here (folder # one)'
    Search for 'testfile' as a filename or 'Penguin' as content, you will see the "From Here" change to "From Here (folder )"

Baloo is fine with the folder name, baloosearch finds indexed files and dolphin works when asking baloo for results, it just seems to be the "filenamesearch" that trips up here...

    ... Confirming (in Neon Testing)
Comment 2 S. Christian Collins 2023-01-13 06:29:53 UTC
I'll just mention since it wasn't outright stated in the bug report: this bug causes the search to fail. I can confirm the bug in the latest version of KDE neon Unstable Edition (Dolphin version: 23.03.70, KDE Plasma Version: 5.26.80, KDE Frameworks Version: 5.102.0, Qt Version: 5.15.8).