safe-rm should have a "strict" setting

Bug #1070252 reported by quazgar
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Safe-rm
Triaged
Wishlist
Unassigned

Bug Description

I think that safe-rm should have a "strict" setting: If one target is in the black list, the whole rm procedure should be stopped with an exit status of != 0.

This would for example if ~/* was to be deleted, and ~/Documents is protected, this would protect everything else there as well. Much better than having to add every single file :)

Revision history for this message
quazgar (quazgar) wrote :

Using this patch, safe-rm should do what I proposed. It's not configurable yet, that would have to be implemented by someone who actually knows perl.

Revision history for this message
François Marier (fmarier) wrote :

That's an interesting idea.

It does feel a bit different from what I imagined safe-rm to be (i.e. a tool that doesn't get in the way and only protects critical things) given that it actually makes the rm operation fail (or stop). So I guess it shouldn't be the default.

Changed in safe-rm:
importance: Undecided → Wishlist
status: New → Triaged
Revision history for this message
quazgar (quazgar) wrote :

Yes, I agree that the optimum would be to have this configurable in the config files (e.g. some line denote critical deletes, other just single protected directories), but that would be something to think about thoroughly, of course.

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.