Bug 48923

Summary: deleting an icon representing a share tries to delete all files on the share
Product: [Unmaintained] kio Reporter: Lubos Lunak <l.lunak>
Component: devicesAssignee: Joseph Wenninger <jowenn>
Status: RESOLVED FIXED    
Severity: critical CC: jeremyhu
Priority: NOR    
Version: SVN   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: patch

Description Lubos Lunak 2002-10-09 14:20:05 UTC
Version:            (using KDE Devel)
Installed from:    Compiled sources

I decided to remove all icons from the desktop, so I selected them all using the mouse, and hit Shift+Delete (ok, I know this is not the best way to delete them, but this is not an excuse for this bug). I confirmed in the dialog that I really want to delete all the files, and the list also included two 'devices:/ ...' URLs of two mounted shares. After that, a progress dialog showed and I of course clicked Cancel immediately after noticing it said something like '523 files'. I'm assuming it was trying to delete everything on the share, which I consider a major bug - I was just trying to remove the icon, and I definitely didn't want to wipe out all files on the share.
 For obvious reason, I'm not going to repeat it and check if it was really going to delete them. I'm also not 100% sure what the progress dialog listed, besides a large number in front of word 'files'. But I don't see any other possible explanation.
Comment 1 Stephan Kulow 2002-10-21 17:09:24 UTC
that bug can lead to loss of data -> critical 
Comment 2 jeremyhu 2002-10-27 21:19:59 UTC
Some change to cvs over the past 36 hours has had the following effect:

When I started KDE up after recompileing CVS, my desktop icons were scattered, and I had icons on my desktop corresponding to "Remote share (XXX) mounted at XXX"  It basically shows all my NFS (which is alot).  I wanted to delete them, but nothing in ~/Desktop corresponded to them (how are they there?), so I decided to just drag them to the trash bin, and it had the effect mentioned above.  You guys really should have fixed this critical bug before adding in annoying icons to the desktop that people will be compelled to delete TRIGGERING this critical bug.  I compell you to NOT release RC1 or another beta until this has been addressed.
Comment 3 Stephan Binner 2002-10-28 00:06:52 UTC
Try RMB "Configure Desktop..." and the behavior category. 
Comment 4 jeremyhu 2002-10-28 00:42:01 UTC
Thanks.  I figured that out after a bit of digging around.  But the point
remains that it should not be enabled by default with such a critical bug. 
Please set it back to be disabled by default in cvs so this doesn't happen to
another unsuspecting person.  Besides, I would argue that it should be disabled
by default even if it did not have this bug.
Comment 5 Roger Larsson 2002-10-28 22:42:15 UTC
It is possible to reproduce this against floppy.      
      
Howto:      
* put an floppy with contents in the driver (preferably a empty one that you add some files on)      
* mount it by clicking on the floppy icon on background (devices:/floppy)      
* mark ONLY the mounted floppy icon (select area)      
* delete (DEL) the selected "icon"      
=> the icon gets removed (expected)      
=> the contents on that floppy will be put into the trash bin (unexpected)      
      
If you press SHIFT+DEL instead (and has the warning enabled) it says:     
 "Do you really want to delete devfd0mediafloppy from /?"    
    
What I think happens is that devfd0mediafloppy gets translated into /media/floppy    
[the mount point] and then the action is carried out on that.    
    
An other indication that this is what happens is that the second time you DEL    
it notifies you that there already exists a floppy in the trash...   
Comment 6 Stephan Kulow 2002-10-29 00:00:46 UTC
Subject: Re: disabling kio_devices

On Montag, 28. Oktober 2002 14:44, Stephan Kulow wrote:
> Hi!
>
> devices:/ has one critical bug open for over three weeks now
> without any progress and it's not a one line fix, but from what
> I would say a design flaw:
> http://bugs.kde.org/show_bug.cgi?id=48923
>
> David and I think, kio_devices should be disabled completly for
> the 3.1 release (including the kcontrol part of it) if that bug
> can't be fixed til we tag RC1 (which is about to be impossible
> as it's tonight).
>
> I will do that tonight unless Joseph can come up with a solution
> quickly. The solution to return desktop files from devices:/ is already
> prepared in the sources, but has never been implemented ;(

OK, please check the attached patch. It disallows the move of trash
and delete for protocols that do not support deleting.

Greetings, Stephan


Created an attachment (id=304)
patch
Comment 7 Stephan Kulow 2002-10-29 14:05:04 UTC
Subject: kdebase/libkonq

CVS commit by coolo: 

do not let users move stuff in the trash that can't be deleted
CCMAIL: 48923-close@bugs.kde.org 
(approved by David)


  M +21 -4     konq_operations.cc   1.104

Comment 8 Christian Steffen 2002-10-29 19:28:02 UTC
Well I know this bug well too.
I created links to all my windows partitions and I saw that these were too much 
links for me (nearly 15), and wanted to delete them again, as I saw this 
dialogue...."deletin 10xxxx files..." I directly canceld. I haven't mentioned 
lost data yet, but maybe, that someday I'll miss something ;)

regards
*cc*