rock3r/deep-clean

Previous backup folders are included in Nuke cleanup

Opened this issue · 0 comments

Describe the bug
When you have previous backup folders (e.g., *backup00, *backup01, etc.) the script considers them for cleanup too. We should filter out the folders that match .*backup\d{2}$.

To Reproduce
Steps to reproduce the behavior:

  1. Run the script once with the --backup and --nuke options
  2. Confirm it has created backups
  3. Run the script again, with the --dry-run and --nuke options
  4. Confirm that it would try to clear the previously backup folders too

Expected behavior
Backup folders should be ignored and not nuked

Desktop (please complete the following information):

  • OS: macOS 10.13.5 (17F77)
  • Version: 1.3.0