geoffreywiseman / prune

A simple utility for pruning files based on date as a means of keeping increasingly sparse backups.
http://geoffreywiseman.github.com/prune
The Unlicense
2 stars 0 forks source link

Handle 'Unable to Delete' Better #11

Closed geoffreywiseman closed 13 years ago

geoffreywiseman commented 13 years ago

Stack trace when you don't have permission to delete:

Proceed? [y/N]: Y ./bin/../lib/prune/pruner.rb:65:in delete': Permission denied - tmp/test/to_archive (Errno::EACCES) from ./bin/../lib/prune/pruner.rb:65:inact' from ./bin/../lib/prune/pruner.rb:45:in execute_prune' from ./bin/../lib/prune/pruner.rb:43:ineach_pair' from ./bin/../lib/prune/pruner.rb:43:in execute_prune' from ./bin/../lib/prune/pruner.rb:24:inprune' from ./bin/../lib/prune/cli.rb:42:in `parse_and_run' from bin/prune:7

geoffreywiseman commented 13 years ago

Refactored the way exceptions are handled to handle delete. Closed by f93b6fc2ad395dcf2a8256367973fc9b1a881ad2.