RFE: change "deleting all instances of a file" warning

Bug #621648 reported by Rolf Leggewie
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
fslint (Ubuntu)
Triaged
Wishlist
Unassigned

Bug Description

Binary package hint: fslint

TEST case:

 mkdir -p /tmp/1 /tmp/2
 for i in 1 2 ; do
    echo test > /tmp/$i/test.txt
    echo "test 2" > /tmp/$i/test2.txt
    echo "test 3" > /tmp/$i/test3.txt
 done
 fslint-gui /tmp/1 /tmp/2

Now search for duplicate files. Mark the results with a wildcard of /tmp/* and hit the delete button.

You will see some warnings:

 "Are you sure you want to delete these 6 items?"

 "Are you sure you want to delete all items in this group?"

The latter warning is repeated, identicly, for each of the three groups, but provides no hints as to which files are involved. It seems that nothing is deleted until all these questions have been answered "yes".

Now, you may say, that's incredibly stupid and nobody would ever do that. Yes, you are right in this simple case. But consider where you have a list with hundreds of duplicates and maybe involving one master directory and two clone directories (that you want to check for slight variations). It's very easy to do something that isn't really intended like wildcarding for both clone directories and inadvertantly deleting all occurrences of a file in case it does not exist in the master directory. It would be great if fslint-gui did a better job of protecting the user from their own stupidity ;-)

Recommended alternative warning:

    "WARNING: You are about to delete *all* occurrences of the files with md5sum $md5sum such as $samplefilename

    Are you really sure you want to do this?"

Revision history for this message
Pádraig Brady (p-draigbrady) wrote :

That's been implemented since 2.40 (21/07/2009)

Rolf Leggewie (r0lf)
description: updated
Revision history for this message
Rolf Leggewie (r0lf) wrote :

you are indeed right, fslint does warn now. May I suggest a slightly different wording? Something like

"WARNING: You are about to delete *all* occurrences of the files with md5sum $md5sum such as $samplefilename

Are you really sure you want to do this?"

Yes/Yes, don't ask again for current result list/No

Changed in fslint (Ubuntu):
status: New → Invalid
summary: - fslint should warn before deleting all instances of a file
+ RFE: change warning before deleting all instances of a file
Changed in fslint (Ubuntu):
importance: Undecided → Low
status: Invalid → New
Rolf Leggewie (r0lf)
summary: - RFE: change warning before deleting all instances of a file
+ RFE: change "deleting all instances of a file" warning
Rolf Leggewie (r0lf)
Changed in fslint (Ubuntu):
importance: Low → Wishlist
status: New → Triaged
Revision history for this message
Neal McBurnett (nealmcb) wrote :

To clarify: the first warning I see (FSlint 2.42 in Precise) is
 "Are you sure you want to delete these 2 items?"

The second warning (repeated for each hash for which all files are deleted) is
 "Are you sure you want to delete all items in this group?"

And it seems that nothing is deleted until all that question has been answered for each hash for which the entire group of files with that hash are marked for deletion.

So I agree that providing more information in the latter message is a good idea. But for now users may be able to feel ok knowing that if they see the latter message more times than they expect, they can cancel it, and should look very carefully....

FWIW, I used this to make three sets of identical files for testing:

    for i in 1 2 ; do echo test > /tmp/$i/test.txt; echo test2 > /tmp/$i/test2; echo "test 3" > /tmp/$i/test3.txt;done

Neal McBurnett (nealmcb)
description: updated
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.