photomix/features/support/clean_folder.rb

9 lines
289 B
Ruby
Raw Normal View History

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