photomix/features/support/clean_folder.rb
2009-06-04 22:28:28 +02:00

9 lines
No EOL
289 B
Ruby

After do
require "find"
Find.find( APP_CONFIG[:photos_path] ) { |path|
Dir.delete( path ) if path != APP_CONFIG[:photos_path] && File.directory?(path)
}
Find.find( APP_CONFIG[:thumbs_path] ) { |path|
Dir.delete( path ) if path != APP_CONFIG[:thumbs_path] && File.directory?(path)
}
end