Bug 419449 - Application Launcher ignores filenames of recent documents from hash sign on
Summary: Application Launcher ignores filenames of recent documents from hash sign on
Status: CONFIRMED
Alias: None
Product: plasmashell
Classification: Plasma
Component: Application Menu (Kicker) widget (show other bugs)
Version: 5.15.5
Platform: Other Linux
: NOR normal
Target Milestone: 1.0
Assignee: Eike Hein
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-03-31 11:54 UTC by yoehoduv
Modified: 2021-06-14 00:06 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
a wrong file name shows in history tab (69.16 KB, image/png)
2020-03-31 11:54 UTC, yoehoduv
Details

Note You need to log in before you can comment on or make changes to this bug.
Description yoehoduv 2020-03-31 11:54:27 UTC
Created attachment 127134 [details]
a wrong file name shows in history tab

SUMMARY

When the filename of a recent document includes a hash sign, the history
tab in Application Launcher shows a file whose name only has the part
preceding the hash sign.  And when I click on the entry from the history
tab, it tries to open a file whose name is the part preceding the hash
sign.

STEPS TO REPRODUCE

Create a file `~/foo#`.

    echo foo > ~/'foo#'

Double click on it in Dolphin to open it.

There should be a new file in `~/.local/share/RecentDocuments` and a new
entry in the History tab in Application Launcher.

    $ ls -al ~/.local/share/RecentDocuments/
    total 4
    drwx------. 1 user user   24 Mar 31 11:24 .
    drwxr-xr-x. 1 user user 1334 Mar 30 11:27 ..
    -rw-------. 1 user user  114 Mar 31 11:24 foo#.desktop

    $ cat ~/.local/share/RecentDocuments/foo'#'.desktop
    [Desktop Entry]
    Icon=text-plain
    Name=foo#
    Type=Link
    URL[$e]=file:$HOME/foo%23
    X-KDE-LastOpenedWith=org.kde.kwrite

Click on the new entry in Application Launcher.

OBSERVED RESULT

I get asked to choose a program to open foo.  I can choose kwrite, it
says "new file".  If I type in `echo` and check "Run in terminal" and
"Do not close when command exits", I get `/home/user/foo` echoed to my
terminal.

EXPECTED RESULT

I expect clicking the entry from Application Launcher to open the file
`foo#`.

SOFTWARE/OS VERSIONS

Operating System: Fedora 30
KDE Plasma Version: 5.15.5
KDE Frameworks Version: 5.64.0
Qt Version: 5.12.5
Comment 1 Alexander Lohnau 2020-07-17 19:40:37 UTC
Can confirm.

But it works when searching for "foo".

PS: We are using the activities data instead of the recent documents data. This is located in ~/.local/share/kactivitymanagerd/resources/database in the table ResourceEvent. If out search the targettedResource column for "foo" you will see that the filename is correctly stored.
Comment 2 Patrick Silva 2021-06-14 00:06:16 UTC
On Arch Linux running Plasma 5.22 I get this message:
"Unable to rum the command specified. The file or folder XXX does not exist."