# HG changeset patch # User zegervdv # Date 1398091637 -7200 # Node ID 625fc94c8e62dbfd56d14213d665dff46249f911 # Parent 6b18003ca7028e4cc7994a2444cb5765032306fc Add maid rules diff -r 6b18003ca702 -r 625fc94c8e62 maid/general.rb --- 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