lib/jekyll-admin/server.rb in jekyll-admin-0.2.0 vs lib/jekyll-admin/server.rb in jekyll-admin-0.3.0
- old
+ new
@@ -70,12 +70,13 @@
alias page_body document_body
def write_file(path, content)
path = sanitized_path(path)
FileUtils.mkdir_p File.dirname(path)
- file = File.write path, content
+ File.open(path, "wb") do |file|
+ file.write(content)
+ end
site.process
- file
end
def delete_file(path)
File.delete sanitized_path(path)
site.process