Mercurial > dotfiles.old
changeset 52:625fc94c8e62
Add maid rules
author | zegervdv <zegervdv@me.com> |
---|---|
date | Mon, 21 Apr 2014 16:47:17 +0200 |
parents | 6b18003ca702 |
children | 5a6bb76d0de1 |
files | maid/general.rb |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/maid/general.rb Tue May 13 21:53:54 2014 +0200 +++ b/maid/general.rb Mon Apr 21 16:47:17 2014 +0200 @@ -20,7 +20,7 @@ end rule 'Remove empty folders' do - trash(dir('~/Downloads/**/*').select { |path| File.directory?(path) && File.stat(path).size < 1.megabyte }) + trash(dir('~/Downloads/**/*').select { |path| File.directory?(path) && (File.stat(path).size < 1.megabyte || dir("#{path}/*").empty? ) }) end rule 'Remove old files' do