From fafacc43ca69dd6d57bd1d3ad2100c3fb47a81b3 Mon Sep 17 00:00:00 2001 From: Casey Lang Date: Thu, 16 May 2013 16:15:21 -0500 Subject: [PATCH] Add ? to preserve_source_location --- lib/jekyll/commands/new.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/jekyll/commands/new.rb b/lib/jekyll/commands/new.rb index 7021e7d2..ea35ef40 100644 --- a/lib/jekyll/commands/new.rb +++ b/lib/jekyll/commands/new.rb @@ -8,7 +8,7 @@ module Jekyll new_blog_path = File.expand_path(args.join(" "), Dir.pwd) FileUtils.mkdir_p new_blog_path - if preserve_source_location(new_blog_path, options) + if preserve_source_location?(new_blog_path, options) Jekyll::Stevenson.error "Conflict:", "#{new_blog_path} exists and is not empty." exit(1) end @@ -33,8 +33,8 @@ module Jekyll end private - - def self.preserve_source_location(path, options) + + def self.preserve_source_location?(path, options) !options[:force] && !Dir["#{path}/**/*"].empty? end