Bug 316097

Summary: copying or moving folder to one of its own subfolders should never be possible
Product: [Applications] kmail2 Reporter: Wolfgang Rohdewald <wolfgang>
Component: commands and actionsAssignee: kdepim bugs <kdepim-bugs>
Status: RESOLVED FIXED    
Severity: normal CC: wolfgang
Priority: NOR    
Version: Git (master)   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In: 4.13.1

Description Wolfgang Rohdewald 2013-03-04 02:25:02 UTC
trying to do that with mouse dragging correctly shows a forbidden symbol.

but using the context menu "Move folder to ...", the folder to be moved is shown in the list of possible targets. Both in "Recent folders" and "Local folders". And both for moving and copying folders.

Reproducible: Always

Steps to Reproduce:
1. have a folder A with subfolder B
2. on folder A, use context menu "Copy folder to .."

Actual Results:  
the target folder list shows A. Selecting A gives "Failed to copy collection" or "Unable to reparent collection" (when trying to move).

Expected Results:  
the target folder list should not show A
Comment 1 Wolfgang Rohdewald 2013-03-04 02:35:02 UTC
I wonder how a newly opened bug report can automatically get status "CONFIRMED", now manually changed to "UNCONFIRMED"
Comment 2 Wolfgang Rohdewald 2014-04-10 08:58:49 UTC
this bug is still there with KDE 4.12.97
Comment 3 Laurent Montel 2014-04-13 10:21:43 UTC
Git commit 90defb6a2543abb89038e3013d5e346b52706cca by Montel Laurent.
Committed on 13/04/2014 at 10:20.
Pushed by mlaurent into branch 'KDE/4.13'.

Start to fix Bug 316097 - copying or moving folder to one of its own subfolders should never be possible

Disable move folder to its subfolder.
Disable copy folder in own folder
Still need to fix recent folder

But for me copy to subfolder must be authorized

M  +9    -4    akonadi/standardactionmanager.cpp

http://commits.kde.org/kdepimlibs/90defb6a2543abb89038e3013d5e346b52706cca
Comment 4 Laurent Montel 2014-04-13 11:10:53 UTC
Git commit d30442760440bbe604ab20278f7b38a754404edf by Montel Laurent.
Committed on 13/04/2014 at 11:09.
Pushed by mlaurent into branch 'KDE/4.13'.

Fix Bug 316097 - copying or moving folder to one of its own subfolders should never be possible

FIXED-IN: 4.13.1

M  +7    -3    akonadi/recentcollectionaction.cpp
M  +3    -3    akonadi/recentcollectionaction_p.h
M  +2    -2    akonadi/standardactionmanager.cpp

http://commits.kde.org/kdepimlibs/d30442760440bbe604ab20278f7b38a754404edf