lib/nanoc/cli/commands/create-site.rb in nanoc-4.0.0a2 vs lib/nanoc/cli/commands/create-site.rb in nanoc-4.0.0b1

- old
+ new

@@ -278,10 +278,10 @@ # Extract arguments and options path = arguments[0] data_source = options[:datasource] || 'filesystem_unified' # Check whether site exists - if File.exist?(path) + if File.exist?(path) && (!File.directory?(path) || !(Dir.entries(path) - %w{ . .. }).empty?) raise Nanoc::Int::Errors::GenericTrivial, "A site at '#{path}' already exists." end # Check whether data source exists if Nanoc::DataSource.named(data_source).nil?