Bug 446182

Summary: Contents of baloosearch virtual folder are not exposed properly to terminal programs
Product: [Frameworks and Libraries] kiofuse Reporter: Kishore Gopalakrishnan <kishore96>
Component: generalAssignee: a.saoutkin
Status: REPORTED ---    
Severity: normal CC: fabian, kio-bugs-null, tagwerk19
Priority: NOR    
Version First Reported In: 5.0.1   
Target Milestone: ---   
Platform: Other   
OS: Other   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Kishore Gopalakrishnan 2021-11-28 05:58:05 UTC
SUMMARY
If Dolphin's embedded terminal is opened while performing a search, the terminal opens in a virtual folder containing the search results. However, one is not able to manipulate these search results on the command line as if they are actual files.

STEPS TO REPRODUCE
1. Perform a search in Dolphin
2. Press F4 (embedded terminal) and run the following commands
3. file $A_FILE_IN_THE_RESULTS
4. cat $A_FILE_IN_THE_RESULTS

OBSERVED RESULTS
In step 3, it says the file is a symbolic link to /run/user/$UID/kio-fuse-$RANDOM_IDENTIFIER/baloosearch/$ACTUAL_FS_LOCATION_OF_FILE

In step 4, cat complains that the file is a directory. Other command line tools also seem to display similar behaviour (i.e. they do not treat the results as actual files that can be manipulated in the usual way).

EXPECTED RESULTS
In step 3, the file should be a link to $ACTUAL_FS_LOCATION_OF_FILE. It seems pwd is erroneously prepended to the correct path while creating the symlink.

In step 4, one should be able to access the returned search result as if it were an actual file (or a symlink to an actual file).

SOFTWARE/OS VERSIONS
kio-fuse: 5.0.1-1
Operating System: Arch Linux
KDE Plasma Version: 5.23.3
KDE Frameworks Version: 5.88.0
Qt Version: 5.15.2
Kernel Version: 5.15.5-arch1-1 (64-bit)
Graphics Platform: X11
Processors: 8 × AMD Ryzen 5 3500U with Radeon Vega Mobile Gfx
Memory: 21.5 GiB of RAM
Graphics Processor: AMD Radeon Vega 8 Graphics

ADDITIONAL INFORMATION
Not sure which application this is a bug in, but I am filing it here.

Use case: A user may want to use grep to further narrow down the search results or find the relevant line in the files that are returned in the search results.