Bug 290307 - Dolphin fails to remove network folder through the 'Delete' action in the context menu
Summary: Dolphin fails to remove network folder through the 'Delete' action in the con...
Status: RESOLVED FIXED
Alias: None
Product: dolphin
Classification: Applications
Component: general (show other bugs)
Version: 2.0
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Dolphin Bug Assignee
URL:
Keywords:
: 282848 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-01-01 11:15 UTC by Jekyll Wu
Modified: 2013-09-12 13:21 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 4.8.0


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jekyll Wu 2012-01-01 11:15:20 UTC
Version:           1.99 (using Devel) 
OS:                Linux

When trying to remove network folder in this way, it complains: "Access denied to trash://<NETWORK-FOLDER>"

'Del' key and 'Shift+Del' shortcut work fine. 

No problem when doing this in konqueror, so I think it is something wrong with dolphin.


Reproducible: Always

Steps to Reproduce:
1. go to 'Network' in the Places panel
2. add a network folder
3. open the context menu on the just added network folder, choose the 'Delete' action


Actual Results:  
dolphin complains : "Access denied to trash://<NETWORK-FOLDER>"



Expected Results:  
the network folder should be removed successfully

I'm using dolphin built from the master code, so the actual version is 2.0.95
Comment 1 Jekyll Wu 2012-01-02 09:20:14 UTC
Well, I just realized something quite confusing to me.  

When I found the problem and succeeded in reproducing it, the "Show Delete command" option was disabled in dolphin. However, the context menu of network folder contained the 'Delete' action and that action failed. 

Now after I enable the "Show Delete Command" option, the context menu of network folder contains the "Move to Trash" action, which is disabled, in addition to the "Delete" action. And now the 'Delete' action works without problem, as in konqueror.

The working case and not-working case are both reproducible.
Comment 2 Jekyll Wu 2012-01-02 11:16:31 UTC
Bug 282848 and bug 260906 are probably related to this.
Comment 3 Jekyll Wu 2012-01-06 01:38:12 UTC
(In reply to comment #2)

Typo: bug 269096
Comment 4 Jekyll Wu 2012-01-08 15:20:07 UTC
Well, after poking around dolphincontextmenu.cpp for a while, I guess I have found where the thing goes wrong.

When "Show 'Delete' command " option is disabled, the 'Delete' entry in the context menu is provided by m_removeAction, which triggers slotRemoveActionTriggered(). However, the code within slotRemoveActionTriggered() makes the decision of trashing or deleting only based upon whether 'Shift' key is pressed. So it tries to trash the selected items in this case, which is unexpected and destined to fail.

When "Show 'Delete' command " option is enabled, the 'Delete' entry in the context menu is provided by the 'delete' action. So it really deletes the selected items as expected.

I think bug 290954 and bug 264583 are also caused by this issue.

@Peter, I hope that helps.
Comment 5 Peter Penz 2012-01-08 15:25:20 UTC
@Jekyll: Thanks for the good analyses, hopefully I have the time to fix this soon...
Comment 6 Peter Penz 2012-01-14 19:05:54 UTC
Git commit db03ca88fa8634e6da1773213cac05207ac3627b by Peter Penz.
Committed on 14/01/2012 at 20:02.
Pushed by ppenz into branch 'KDE/4.8'.

Fix issue when deleting items with the context menu

Thanks to Jekyll Wu for the analyses of the issue!
Related: bug 269096, bug 290954, bug 264583
FIXED-IN: 4.8.0

M  +10   -6    dolphin/src/dolphincontextmenu.cpp
M  +11   -3    dolphin/src/dolphincontextmenu.h

http://commits.kde.org/kde-baseapps/db03ca88fa8634e6da1773213cac05207ac3627b
Comment 7 Peter Penz 2012-01-14 19:06:25 UTC
Git commit 41c2957f9b17bfa6d9394329800c8d4ed7e20749 by Peter Penz.
Committed on 14/01/2012 at 20:02.
Pushed by ppenz into branch 'master'.

Fix issue when deleting items with the context menu

Thanks to Jekyll Wu for the analyses of the issue!
Related: bug 269096, bug 290954, bug 264583
FIXED-IN: 4.8.0

M  +10   -6    dolphin/src/dolphincontextmenu.cpp
M  +11   -3    dolphin/src/dolphincontextmenu.h

http://commits.kde.org/kde-baseapps/41c2957f9b17bfa6d9394329800c8d4ed7e20749
Comment 8 Jekyll Wu 2012-01-15 02:56:05 UTC
*** Bug 282848 has been marked as a duplicate of this bug. ***
Comment 9 Nick Hobart 2013-08-26 13:59:25 UTC
Sorry to dredge up an old error but I'm continuing to have a similar problem. For example when I simply right-click and choose to delete the folder I get the error:

"Access denied to trash://<NETWORK-FOLDER>"

However, holding the shift key results in the "Move to trash" to change to "Delete" and I am able to delete the network share.

KDE 4.10.5
Fedora 19
Let me know if I can be of any more help.