use copy_entry only in safe mode
This commit is contained in:
parent
46bdaa49dc
commit
52eb60e171
|
@ -80,7 +80,11 @@ module Jekyll
|
||||||
|
|
||||||
FileUtils.mkdir_p(File.dirname(dest_path))
|
FileUtils.mkdir_p(File.dirname(dest_path))
|
||||||
FileUtils.rm(dest_path) if File.exist?(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)
|
File.utime(@@mtimes[path], @@mtimes[path], dest_path)
|
||||||
|
|
||||||
true
|
true
|
||||||
|
|
Loading…
Reference in New Issue