Bug 364530 - Files and Folders in desktop won't open with the right click context menu.
Summary: Files and Folders in desktop won't open with the right click context menu.
Status: RESOLVED FIXED
Alias: None
Product: plasmashell
Classification: Plasma
Component: Desktop Containment (show other bugs)
Version: 5.6.4
Platform: Neon Linux
: NOR normal
Target Milestone: 1.0
Assignee: Sebastian Kügler
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-06-20 08:14 UTC by Chinmoy Ranjan Pradhan
Modified: 2016-06-30 16:40 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
the error message (12.39 KB, image/png)
2016-06-20 08:16 UTC, Chinmoy Ranjan Pradhan
Details
patch for kio(core/kfileitem.cpp) (555 bytes, patch)
2016-06-29 06:08 UTC, Chinmoy Ranjan Pradhan
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Chinmoy Ranjan Pradhan 2016-06-20 08:14:35 UTC
When i right click on any item in desktop and select open then an error message shows up saying
'Malformed url'
'/home/chinmoy/Desktop///"name of the item" '


Reproducible: Always

Steps to Reproduce:
1.right click on any file/folder in your desktop and select open.
2.
3.

Actual Results:  
Error message appears.

Expected Results:  
File/folder should open in their respective application.
Comment 1 Chinmoy Ranjan Pradhan 2016-06-20 08:16:30 UTC
Created attachment 99617 [details]
the error message
Comment 2 Chinmoy Ranjan Pradhan 2016-06-20 10:34:36 UTC
I recently found that the error message appears only if the Location (Desktop/Folder View Settings>Location) is set to Show Desktop Folder or in 'specify a folder' to 'desktop:/'
Comment 3 Rik Mills 2016-06-20 11:10:18 UTC
Seems to occur also in kubuntu yakkety with plasma 5.6.5 staging, and neon with plasma 5.7 beta
Comment 4 Kai Uwe Broulik 2016-06-27 18:57:36 UTC
1. Create a folder in desktop folder
2. add Folder view applet pointing to desktop:/
3. Right click said folder
4. Choose "Open"
-> the mentioned error message
Comment 5 Chinmoy Ranjan Pradhan 2016-06-29 05:29:09 UTC
This error message appears because "desktop:/folder" is expanded to "/home/$USER/Desktop/folder" which in turn is passed to KRun as it is without any scheme. 
It is because the url doesn't have a scheme Krun displays the said errr message.
Comment 6 Chinmoy Ranjan Pradhan 2016-06-29 06:08:49 UTC
Created attachment 99757 [details]
patch for kio(core/kfileitem.cpp)

this patch will cause the function targetUrl() to check for scheme and add one ("file") if no scheme is present.
Comment 7 Kai Uwe Broulik 2016-06-29 06:57:50 UTC
Thanks for your patch! Can you head over to http://git.reviewboard.kde.org and submit it for review there? Patches in the bugtracker tend to get overlooked unfortunately.
Comment 8 Kai Uwe Broulik 2016-06-29 06:58:24 UTC
Nevermind, should have read all my mail first before commenting :)
Comment 9 Bhushan Shah 2016-06-30 16:40:47 UTC
Git commit 6911541421dc068cee531a5fd5f322c0db5d7492 by Bhushan Shah, on behalf of Chinmoy Ranjan Pradhan.
Committed on 30/06/2016 at 16:33.
Pushed by bshah into branch 'Plasma/5.7'.

Fix files/folders in desktop not opening with right click context menu

UDS_LOCAL_PATH will return the path without file scheme. This schemeless
path will be set in UDS_TARGET_URL and then will be used by kio's
targetUrl and then final passed to Krun where it will fail the scheme test
eventually leading to the said bug.

Fix for this is to create a url using QUrl::fromLocalFile and then
pass the url.toString()'s result to insert.
CCMAIL: chinmoyrp65@gmail.com

Differential revision: https://phabricator.kde.org/D2054

M  +2    -1    kioslave/desktop/kio_desktop.cpp

http://commits.kde.org/plasma-workspace/6911541421dc068cee531a5fd5f322c0db5d7492