use copy_entry only in safe mode

This commit is contained in:
surrim 2016-03-11 18:45:40 +01:00
parent 46bdaa49dc
commit 52eb60e171
1 changed files with 5 additions and 1 deletions

View File

@ -80,7 +80,11 @@ module Jekyll
FileUtils.mkdir_p(File.dirname(dest_path))
FileUtils.rm(dest_path) if File.exist?(dest_path)
FileUtils.copy_entry(path, dest_path)
if @site.safe || Jekyll.env.start_with?("prod")
FileUtils.cp(path, dest_path)
else
FileUtils.copy_entry(path, dest_path)
end
File.utime(@@mtimes[path], @@mtimes[path], dest_path)
true